Code Monkey home page Code Monkey logo

words_with_friends_solver's Introduction

Words With Friends Solver

Accompanying blog posts!: Part 1, Part 2

To run this solver, you must edit the solver.py file. In it, you will find a string that looks something like:

board_string = '''
  A   B   C   D   E   F   G   H   I   J   K 
 --------------------------------------------
|   |   |   |   |   |   |   |   |   |   |   | 1 
 --------------------------------------------
|   |   |   |   |   |   |   |   |   |   |   | 2 
 --------------------------------------------
|   |   |   |   |   |   |   |   | s |   |   | 3 
 --------------------------------------------
|   |   |   |   |   | t |   |   | p |   |   | 4 
 --------------------------------------------
|   |   | f | i | n | o |   |   | a |   |   | 5 
 --------------------------------------------
|   |   |   |   |   | w | o | r | d | s |   | 6 
 --------------------------------------------
|   |   |   |   |   | n |   | a | e |   |   | 7 
 --------------------------------------------
|   |   |   |   |   |   |   | g |   |   |   | 8 
 --------------------------------------------
|   |   |   |   |   |   |   | s |   |   |   | 9 
 --------------------------------------------
|   |   |   |   |   |   |   |   |   |   |   | 10 
 --------------------------------------------
|   |   |   |   |   |   |   |   |   |   |   | 11 
 --------------------------------------------
'''

Edit this string so that it looks like your current board configuration, making sure that everything lines up straight. This will create a Board class with this as its config. Below this, you will find an instance of a Solver class. Feed this your current letters, for example 'djfpeys', by editing the my_letters variable and run the print_solutions method. This will output all possible plays in order of highest score.

Currently there is no functionailty for blank tiles but hopefully I will be able to add this soon. Pull requests welcome!

Enjoy and use responsibly! ;)

words_with_friends_solver's People

Contributors

nickelnine37 avatar

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.