bakoorahnin / wordle-algorithm

The word matching algorithm of WORDLE game. JS/PHP/Python/C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WORDLE Algorithm

This is matching algorithm of WORDLE game. You can implement the algorithm to build your desired application.

Basic Usage

JavaScript

import {Wordle} from './wordle'

Wordle(guess, solution)

PHP

include('wordle.php')

Wordle($guess, $solution)

Python

from 'wordle' import Wordle

Wordle(guess, solution)

C#

// Import namespace or Include to your class

Wordle(guess, solution)

Return Type

Returns an Array/String[] of the status of each letter of the guessed word comparing to the solution word.

  • "correct" : The letter is in correct position
  • "present" : The letter is in present in the word, but not in position
  • "absent" : The letter is in absent in the word

Example return: ["absent", "present", "correct", "present", "absent"]

About

The word matching algorithm of WORDLE game. JS/PHP/Python/C#


Languages

Language:C# 35.1%Language:PHP 24.3%Language:Python 20.4%Language:JavaScript 20.1%