我目前正在制作“火柴棍”游戏,我希望能够从字符串中删除元素
它应该是这样的:
null
我应该能够通过“匹配:”来告诉我要删除多少个匹配项,并在“行:”的哪一行中删除?
这是我尝试过的:
$> python ./matchstick.py -l 2 -m 10
*****
* | *
*|||*
*****
Your turn:
Line: 1
Matches: 1
Player removed 1 match(es) from line 1
*****
* *
*|||*
*****
我的问题是,如何根据输入内容删除匹配项?