Code Monkey home page Code Monkey logo

hurdle's Introduction

Hello, World! ๐ŸŒŽ๐ŸŒ๐ŸŒ

As a self-taught software developer, I took my education further by attending 42, a peer-led vocational school for software developers. I then spent 3 years working independently as full-stack web-developer for several clients. I went on to attend a batch at The Recurse Center, an educational retreat for programmers, where I learned about Rust and Embedded Systems.

  • ๐ŸŒฑ Currently learning: Rust, Python, Concurrency
  • ๐Ÿ’ฌ Talk to me about: Emacs, Rust, Python
  • ๐Ÿ˜ Follow me on: Mastodon

hurdle's People

Contributors

chrisrenfrow avatar

Watchers

 avatar  avatar

hurdle's Issues

Incorrect matching behavior

Repeating letter in guess shouldn't match more times than there are instances of the letter in target word.

Example:

$ cabal repl
# [...]
*Main> import Wordle
*Main Wordle> getMatches "brake" "beale" 
# where "brake" is the target word and "beale" is the guess

Expected response:
[('b',InPlace),('e',NotInWord),('a',InPlace),('l',NotInWord),('e',InPlace)]

Actual response:
[('b',InPlace),('e',InWord),('a',InPlace),('l',NotInWord),('e',InPlace)]

The actual response seems to indicate that there's another 'e' in the target word in addition to the one that is in-place, which is obviously incorrect.

Possible fix, match in-place first and then match in-word with the following condition in mind; If the letter is already in-place or in-word and there are no other instances, then mark as not-in-word, else mark as in-word.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.