TicTacToe


SUBMITTED BY: Rishi556

DATE: Feb. 20, 2016, 2:36 a.m.

FORMAT: Objective-C

SIZE: 466 Bytes

HITS: 985

  1. - (IBAction)c1Button:(id)sender {
  2. if ((status.text = @"X goes now"))
  3. {
  4. c1.text = @"X";
  5. if ([c1.text isEqualToString: @"X"])
  6. {
  7. status.text = @"O goes now";
  8. }
  9. else
  10. {
  11. status.text = @"X goes now";
  12. }
  13. }
  14. else if ((status.text = @"O goes now"))
  15. {
  16. c1.text = @"O";
  17. if ((c1.text = @"O"))
  18. {
  19. status.text = @"X goes now";
  20. }
  21. else
  22. {
  23. status.text = @"O goes now";
  24. }
  25. }
  26. }

comments powered by Disqus