im making a school project on green-foot, its like card matching game. u click on a card on the world witch is backwards then when clicked the card turns the other side on its position, no movements. plz help, im like begginer for green foot. this is what i have done
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class CardTableGame here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class CardTableGame extends World
{
/**
* Constructor for objects of class CardTableGame.
*
*/
public CardTableGame()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(2500, 2500, 1);
addObject(new CardBack(),120,160);
}
}
public class CardBack extends Actor
{ public void CardTableGame()
{
{
super(800, 800, 1);
shuffleCards();
}
}
public void shuffleCards()
{
int x = 100; int y = 100;
for(int i = 0; i < 10; i++)
{
addObject(new CardBack("KingSpades.png"), x, y);
}
x = 100;
y = y + 100;
}
}
fix any problems if there is one, because im getting errors XD
