Hi all, I'm currently trying to create a java Snake game similar to classic snake mobile phone game.
So far i have created the grid and the food object to be placed onto the grid. However, how do i get food to be displayed onto the grid with the letter 'F' in random positions until the snake has eaten them.
Here is what i have so far.
import java.util.Arrays.*;
import java.util.Random.*;
import java.lang.*;
import java.util.*;
public class SnakeGame
{
int x;
int y;
public Object grid[31][31]; //31 x 31 grid
{
Random x = new Random(31);
Random y = new Random(31);
Object food = new Object();
}
}