Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compte est bon Game

Overview

"Compte est bon" (The Countdown Numbers Game) is a mathematical puzzle game where players use given numbers and basic arithmetic operations to reach a target number.

Features

  • Play Mode: Interactively play the game and try to reach the target number using the given numbers
  • Solver Mode: Automatically find all possible solutions for a given set of numbers and target

How to Play

  1. You are given a set of numbers (choosen in 1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,25,50,75,100) and a target number
  2. Use the four basic operations (+, -, ×, ÷) to combine the numbers and reach the target
  3. Each number can be used at most once
  4. The goal is to reach the target number exactly (but sometimes its simply not possible to do so)

Usage

    from chiffres import Chiffres

    mySolver = Chiffres([2, 4, 5, 25])
    mySolver.solve()
    mySolver.printDictionary("results.txt")
    solutions = mySolver.play(545)
    if(len(solutions) > 0):
        solutions.sort(key=Solution.qualite)
        print(solutions[0])
    else:
        print("No solution found")

Requirements

  • Python 3.14
  • uv (install the environment)

created by ESHome33

About

Le compte est bon - Countdown number game

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages