Skip to content

falon3/Wordless

Repository files navigation

Wordless: a fast-paced word game Authors: Craig Graff, Falon Scheers Cmput275 LBL B2, LBL EB1

Required software/environment: Kivy 1.9.0 http://kivy.org/#download

In windows: To run the game click on the Wordless.py file and 'open with' kivy-3.4.bat Alternately, open kivy-3.4.bat and navigate to game folder, then run: python3 main.py

In Linux/Mac: (NOTE: not currently tested on Linux or Mac) with the latest version of kivy installed and python 3.4 or above, open a terminal and navigate to the game folder, then run: python3 main.py

Required modules/files: -board.py Most of the game play is done in this module, the board updates and animations as well as calls to the timer and score functions. Also the ending game function and screen are handled here. The tiles are created and assigned to the graph in the init function here. -tile.py Functionality for word lookup and tile animation is found here. -main.py Main file that runs the game app and sets up the screens used (game screen and menu/score screen). -words.py Contains the trie structure (nested dictionaries of all word prefixes) and the data for letter frequencies and word score. Also contains the depth-first exhaustive search for the most valuable word on the board. -graph_v2.py Our graph class used to distinguish which tiles are connected to eachother. The only change was to put neighbors into a set for constant lookup time. -us_cad_dict.txt: A large list of all of the words in Canadian and United States dictionary, plus any Hacker words -Wordless.kv Gui markup code for kivy.

Code references: - Graph Class and functionality from class notes - dictionary file generated by http://app.aspell.net/create - Trie code modified from answer about boggle solvers on stack overflow

Highlights: - The board is a graph with each tile as a vertex and edges to all adjacent tiles. This is used both for the selection of words and the search for the most valuable word. - The word list is built into a trie structure (nested dictionary of dictionaries for each word prefix (partial word) with markes for complete words. This allows constant lookup time for partial and complete words. Note: see words.py/dictograph for implementation - The word with the highest score on the board at the time is calculated each time the board changes. This is accomplished through a depth-first exhaustive search with many efficiencies to make this as quick as possible (memoization, constant time operations for each tile search, etc.). Although the theoretical running time of this search is potentially exponential (board consisting all of one letter, words like AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA in dictionary) the average case is quite acceptable (much less than a second) for a reasonable sized board. Usable searches were tested on a very large board (several hundred rows and columns), but time taken there was significant (1-2 seconds or more). NOTE: see words.py/dictograph/find_long_word for implementation

High-level Game Play description:

Wordless is a word game with the main screen as a board with a grid-like array of 7X11 tiles with letters and their score value on them similar to Scrabble tiles. The object of the game is to get the highest score possible before the time runs out to zero.

The game begins at level zero and waits until you accumulate 30 points to start counting down. As you get more points these points directly add to the timer to increase your playing time. At 100, 200, 300, 400, excetera points you level up to the next level of the game by which the timer counts down a bit faster each level. There are score bonuses for each additional letter over 3.

The largest possible scoring word on the board at any given time, or the 'Search Word' is displayed at the bottom of the screen after the first 15 points are scored. As a player you can choose to find the search word for extra big score bonuses or make up your own words from the tiles on the board. While holding the cursor down over a series of connected letter the tiles light up to be yellow if there exists a word from the combination of letters selected, and the tiles go red if there exists no word in the game dictionary that starts with what is selected. Tiles are green when a valid word is selected.

Upon running out of time the user is prompted for their name and if their score is among the top 5 highest then it is saved to the high_scores.txt file and displayed on the screen.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages