In this tutorial, we are going to show how to run a game named “Snake” on pcDuino, and controlled by Linker JoyStick Module.
Snake is a classic casual video game that many people love and are familiar with.
The player controls a long, thin creature, resembling a snake, which roams around on a bordered plane, picking up food (or some other item), trying to avoid hitting its own tail or the “walls” that surround the playing area. Each time the snake eats a piece of food, its tail grows longer, making the game increasingly difficult. The user controls the direction of the snake’s head (up, down, left, or right), and the snake’s body follows. The player cannot stop the snake from moving while the game is in progress, and cannot make the snake go in reverse.
download the source code :snake
1：copy the file to pcduino.
2：open the command window and enter the file, execute the make all,
run as the manager if tip no permission, install curse library if tip can’t find
input this command to install the curses library:
sudo apt-get install libncurses5-dev
3: ARDUINO_PATH variable in Makefile is the install directory of arduino.
You can modify it according to the actual conditions