Skip to content

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

Notifications You must be signed in to change notification settings

dgvai/wordle-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.Wordle(guess, solution)

Java

// Import or Include to your class
wordle.Wordle(guess,solution)

Go

// Import or Include to your class
Wordle("agshs","sdsds")

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"]


Wordle Game (ReactJS + Firebase)