Skip to main content

You don't always need a partner to play!


In the last blog, we saw about the basic and common logic which is used in both one user and two user modes. In this blog, we will see the logic used for both the modes with the help of flowchart.
In one user mode, user will always get ‘X’ for playing the game and computer will always get ’O’ symbol, this can be swapped as well. When user plays ‘X’, computer will make the nearest empty button zero. It is the main logic behind one user mode.
                In two users mode, let us assume that user one will use ‘X’ and by default, second user will use ‘O’. If it is win condition then Winner will be displayed in those three winning boxes and it will appear in the above text box as well. When any button is clicked, the win condition is checked. Once, a user puts either a ‘X’ or ‘O’, that button should be locked.
The flow will become more  clear in the flowchart given below.
 For One User  mode:

 For Two User mode:
So this was all about the number of users and how we managed it in our game.
In the next blog we will share a part of the source code and what kind of output we get in particular stages. Until then, HAPPY CODING!


Comments

  1. Creatively informative...Great !!

    ReplyDelete
  2. Nice read. Good work guys! It would be fun to play this online.

    ReplyDelete
  3. Informative and nice presentation of content.

    ReplyDelete
  4. Those flowcharts help a lot...very well done !!! Great work !!

    ReplyDelete
  5. Very well presented !
    especially those flowcharts help us understand the content quickly.

    ReplyDelete
  6. Replies
    1. Thanks a lot!Wait for some more interesting stuff!

      Delete
  7. Fun to read. Logical. Keep doing it✨

    ReplyDelete
  8. Well written, logical, informative.!

    ReplyDelete
  9. Well done guys!!!Very good attempt for one user and two user modes!!

    ReplyDelete
  10. Short & informative read ! Nicely put with flowcharts 👍

    ReplyDelete
  11. Very well presented👍flow charts are very helpful for conceptual understanding. Keep doing it.

    ReplyDelete
  12. Nice work with flowcharts...They are really helpful

    ReplyDelete

Post a Comment