public void btnTriangleOnCLick() { MemoryTrainCurrent = list[counter]; lstDataEntity.Add(MemoryTrainServices.Validate(MemoryTrainCurrent, TypeQuestion, Shapes.Triangle, Colors.Yellow)); UpdateImageAndTexts(); counter++; }
private void UpdateImageAndTexts() { MemoryTrainCurrent = list[counter]; ImageDisplay.sprite = GetSpriteToDisplay(MemoryTrainCurrent.Name); TypeQuestion = TypeQuestion ? false : true; UpdateTexts(TypeQuestion); }
public void btnStarOnCLick() { MemoryTrainCurrent = list[counter]; lstDataEntity.Add(MemoryTrainServices.Validate(MemoryTrainCurrent, TypeQuestion, Shapes.Star, Colors.Green)); UpdateImageAndTexts(); counter++; }
public static MemoryTrainDataEntity Validate(MemoryTrainViewModel model, bool typeOfQuestion, Shapes Selectedshapes, Colors Selectedcolors) { MemoryTrainDataEntity entity; if (typeOfQuestion) // true Check shapes { entity = new MemoryTrainDataEntity { ID = model.ID, Color = model.Color, Shape = model.Shape, Name = model.Name }; entity.Guessed = model.Shape == Selectedshapes ? true : false; } else { entity = new MemoryTrainDataEntity { ID = model.ID, Color = model.Color, Shape = model.Shape, Name = model.Name }; entity.Guessed = model.Color == Selectedcolors ? true : false; } return(entity); }