Python Logical And Statement Javascript Snake Game