eat tail
This commit is contained in:
parent
f6e3792cb1
commit
bddb770ef6
1 changed files with 7 additions and 1 deletions
|
@ -101,7 +101,13 @@ static class Mono
|
||||||
|
|
||||||
public static void Step()
|
public static void Step()
|
||||||
{
|
{
|
||||||
if (s_array[snake[0] + snake_dir] > -1)
|
// eat tail
|
||||||
|
if (snake[0] + snake_dir == snake[snake_len-1])
|
||||||
|
{
|
||||||
|
snake_len--;
|
||||||
|
grow_buffer = 0;
|
||||||
|
}
|
||||||
|
else if (s_array[snake[0] + snake_dir] > -1)
|
||||||
{
|
{
|
||||||
// lose condition
|
// lose condition
|
||||||
bool stuck = true;
|
bool stuck = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue