An m,n,k-game with Connect Four rules

Overview

Description

A simple m,n,k-game with Connect Four rules (i.e. every token must be placed in the lowest possible position).

The size of the board (m * n) as well as the number of stones of the same color in a row required to win (k) can be changed inside the src/game.rs file.

To check who won the game, each move, the code looks for stones of the same color left, right, down and diagonal to the stone placed that turn. If the end of the board is reached, the color of the stone is different or k-in-a-row has already occured, the search can stop early.

Thoughts

While still a fairly basic game I programmed for fun, I do plan on adding a minmax algorithm to play against. Perhaps I will give the project a GUI, I could also expand the m-by-n board to higher dimensions.

You might also like...
This is a command line port of the game Wordle in Rust
This is a command line port of the game Wordle in Rust

Wordle.rs Welcome to Wordle.rs! This is a command line port of the game Wordle in Rust. I built this in order to get more familiar with programming in

TMM is a Linux native game modding tool. it allows to install and depoly mods for Linux native and wine games.

Tux Mod Manager TMM is a Linux native mod manager made with the Tauri toolkit. It can install, load, remove and deploy mods for both Linux native and

Fyrox - 3D and 2D game engine written in Rust
Fyrox - 3D and 2D game engine written in Rust

Fyrox - a modern Rust game engine A feature-rich, production-ready, general purpose 2D/3D game engine written in Rust with a scene editor. Formerly kn

a FREE and MODERN split-screen tetris game WITHOUT ADS
a FREE and MODERN split-screen tetris game WITHOUT ADS

tetr:: A โœจ modern โœจ Tetris game made in OpenGL and Rust Gameplay tetr:: is an implementaion of modern Tetris, and essentially a clone of tetr.io. This

Game of life rendered in your terminal with over 500+ unique patterns to choose from.
Game of life rendered in your terminal with over 500+ unique patterns to choose from.

Controls a: play animation n: next generation s: stop j or down arrow: go down next pattern (note: you have to stop the animation to browse the patter

AI-powered game engine for dynamic, personalized experiences in evolving worlds. Ethical, accessible, inclusive.

ARCADIA: Advanced and Responsive Computational Architecture for Dynamic Interactive Ai: A Whitepaper By Reuven Cohen (rUv) Introduction Imagine a futu

๐Ÿš+๐Ÿฆž Ultra-portable Rust game engine suited for offline 2D games powered by WebAssembly

pagurus ๐Ÿš + ๐Ÿฆž Ultra-portable Rust game engine suited for offline 2D games powered by WebAssembly. Examples Snake Traditional snake game: examples/sn

Sky Island Showdown: CSE 125 Spring 2023 Group 5 Project, a Multiplayer, 3D Game

As the Wind Blows ๐Ÿ’จ Project for CSE 125 Spring 2023, Group 5 Homepage ยป As the Wind Blows is a 3D multiplayer game, created with Rust, WGPU, and a to

A small program which makes a rofi game launcher menu possible by creating .desktop entries for games
A small program which makes a rofi game launcher menu possible by creating .desktop entries for games

rofi-games A small program which makes a `rofi` game launcher menu possible by creating `.desktop` entries for games Installation Manual Clone repo: g

Owner
Elias
I'm Elias, an 18 year old university student from Berlin.
Elias
VICTOR: An Arcane Connect Four AI using Ancient Knowledge from the 80s

VICTOR VICTOR is a program based on 'A Knowledge-based Approach of Connect-Four' by Victor Allis. The original program written in C has been lost to h

null 2 Jan 6, 2022
'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files.

apk-yara-checker 'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files. You have to pass the folde

alberto__segura 15 Oct 5, 2022
A lightweight async Web crawler in Rust, optimized for concurrent scraping while respecting `robots.txt` rules.

??๏ธ crawly A lightweight and efficient web crawler in Rust, optimized for concurrent scraping while respecting robots.txt rules. ?? Features Concurren

CrystalSoft 5 Aug 29, 2023
FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.

Connect quickly to your services ?? FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config. Instal

Julien 85 Dec 14, 2022
A tool for collecting rollup blocks from the Aztec Connect rollup, and exporting them to csv

Aztec Connect Data Gobbler The Aztec Connect Data gobbler is a tool made for extracting data from the Aztec Connect system using only L1 as its source

Lasse Herskind 6 Feb 17, 2023
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

Phoomparin Mano 31 Oct 11, 2023
A visual canvas and virtual machine for writing assembly to build cool things. Create machines and connect them together.

Visual Assembly Canvas A highly visual assembly editor, infinite canvas for wiring blocks and machines together, bytecode virtual machine runnable nat

Phoomparin Mano 32 Oct 11, 2023
Devices can use this SDK to connect to the Spotflow IoT Platform. Supported languages: Rust, Python, C.

Device SDK for Spotflow IoT Platform Languages | Features | Architecture | Building and Testing | License Devices can use this SDK to connect to the S

Spotflow 6 Aug 12, 2024
Nexa programming language. A language for game developers by a game developer

NexaLang Nexa programming language. A language for game developers by a game developer. Features High-Level: Nexa is an easy high level language Two M

Sabe 3 Aug 21, 2023
A word-guessing game from your terminal ๐ŸŸฉโฌ›๐ŸŸฉ๐ŸŸจ๐ŸŸฉ

Poodle Not a ?? (Poodle), but a word-guessing game from your terminal ?? โฌ› ?? ?? ?? Features โœ… In Rust ?? โœ… Attempt logs โœ… Rules of the original game

John Law 9 Apr 17, 2022