/Calculate-24

A funny game about calculate 24

Primary LanguageC++

Calculate-24

A funny game about calculate 24

Game Introduction: This is a Chinese classical puzzle game. We pick four cards numbered from 1 to 13 randomly(the numbers are likely to the same). The player needs to give a calculate solution in as short a time as possible.An acceptable calculate solution requires to calculate four numbers with the use of addition, subtraction, multiplication or division in any order. Simultaneously, each card is allowed to be used only once.

This program uses the Depth-First-Search algorithm.It traverses all possible operations and outputs a set of answers if there is solution.The complexity of the algorithm is O(6^3).