Question: C++ Sim (pencil game For the game Sim (https://en.wikipedia.org/wiki/Sim_(pencil_game)) will be six Points arranged in a circle. The two players connect alternately with different colors

C++

Sim (pencil game

For the game Sim (https://en.wikipedia.org/wiki/Sim_(pencil_game)) will be six Points arranged in a circle. The two players connect alternately with different colors two points each other, between which there is no connection. The goal is to achieve a triangle, ie to connect three points in pairs with the same color.

C++ Sim (pencil game For the game Sim (https://en.wikipedia.org/wiki/Sim_(pencil_game)) will be six

Write the source code and a makefile that generates a sim program. This reads from the standard input separated by spaces the moves that are given as start and end point. The color of the first player is 1, that of the second player 2 (this is automatically against and therefore does not appear in the input). The entry is completed with the number pair (0, 0). It should generate the following output: 1 or 2 if Player 1 or Player 2 has created a triangle. 0, if no player has created a triangle yet. -1, if a wrong move was played (non existent points or already drawn edge selected again).

Zugehrige Eingabedaten: 1 2 1 4 2 3 1 3 3 4 4 5 2 4 0) 2 6 3 Zugehrige Eingabedaten: 1 2 1 4 2 3 1 3 3 4 4 5 2 4 0) 2 6 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!