Tic Tac Toe - Player Indicator Help

Discussion in 'Homework Help' started by kevob33, Oct 27, 2015.

  1. kevob33

    Thread Starter New Member

    Oct 26, 2015
    3
    0
    I am creating a circuit in Logisim which allows two players to play a game of Tic Tac Toe. The game begins when the "Begin Game" button is pressed. When it is pressed, a random player is selected to make the first move. I have used D Flip-Flops throughout my circuit.

    Here is my D Flip-Flop circuit on the top left, as well as what the game looks like on the exterior after the "Begin Game" button has been pressed:

    11111.jpg

    Here it is on the interior (I have removed the rest of the circuit to focus on the area my question is relating to), and below is the circuit for the Random Player Generator (Including a D Flip-Flop and a Random Number Generator which, in this case, outputs either 1 or 2):

    22222.jpg

    As you can see, my Random Player Generator is functioning as it should. However, my problem is now with switching players. Once a player takes their turn, they press their "End of Turn" button and then the "Player X's Turn" lights should swap. I have been struggling to figure this out for quite a long time and have made no progress. I would appreciate any help on how I would achieve this or any suggestions as to how I can implement this changing player function as well as the initial Random Player Generator into my circuit in a better way.

    Thank you for any help in advance
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    Start by listing the inputs and outputs that are relevant to this part of the project. Then make a table showing what should happen as the result of each possible action.
     
Loading...