I am making a Memory Game with cards (I am very new to greenfoot). I want it so if two cards are flipped, then an object that says "Correct" pops up, but I get an error when using addObject.
The object that says Correct is called correct. I get the error "Cannot find symbol - variable correct."
Thank you for your help, and remember I am new to coding so if something is complicated, please explain.
public class Cards extends Actor
{
public static boolean card1Flipped = false;
public static boolean card2Flipped = false;
public static boolean card3Flipped = false;
public static boolean card4Flipped = false;
/** Act - do whatever the Cards wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
ifCorrect();
}
private void ifCorrect()
{
if((card1Flipped = true) && (card2Flipped = true))
{
getWorld().addObject(Correct, 289, 190);
}
}
}


