Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

64bit/wordle-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

35 Commits

Repository files navigation

Wordle in Rust

A Rust library and cli for Wordle. Inspired by Wordle in Bash

Install

cargo install wordler

Play

wordler

Play Demo

Basic Usage

use wordler::dictionary::EnglishDictionary;
use wordler::wordle::{Wordle, PlayResult};
let dictionary = EnglishDictionary::new().unwrap();
let mut wordle = Wordle::new(&dictionary);
let play_result = wordle.play("dream");
match play_result {
 Ok(play_result) => {
 println!("{}", play_result);
 match play_result {
 PlayResult::YouWon(_) => std::process::exit(0),
 PlayResult::YouLost(_, _) => std::process::exit(1),
 PlayResult::TurnResult(_) => {}
 }
 }
 Err(e) => println!("{}", e),
}

About

Wordle in Rust

Resources

License

Stars

Watchers

Forks

Languages

AltStyle によって変換されたページ (->オリジナル) /