Giter VIP home page Giter VIP logo

boggle-2's Introduction

Boggle Challenge Part 2: Word Checker

Summary

While real Boggle includes all words 3 letters or greater in a variety of combinations (i.e., you can zig zag through the board), we're just starting to learn Object Orientation. In this challenge, we are going to build off our last Boggle challenge by using our BoggleBoard generator to check the existence of a 4-letter word against our generated boggle board. Essentially, we need to get all 4-letter combinations of letters on the board (vertical, horizontal, diagonal - all forwards and backwards) and see if our 4-letter word that we pass in is on that board.

Step 1: Pseudocode

Stop! I know what you're about to do. I've done it many times before. You're about to jump in to writing code.

Admiral Ackbar from star wars saying its a trap

Instead, get out some paper and draw out a 4x4 Boggle Board. Fill it with letters (perhaps utilizing your brand-spanking new generator). Pick a gibberish word (makes it easier to check letter by letter) and check if it's on the board.

Reflect on your mental process. How did you do decide if the word was on the board or not?

Write your pseudocode for the algorithm.

Step 2: Implement "BoggleBoard#include_word"

board.include_word("pear") # => True or False

It's time to translate your pseudocode to Python.

What, if any, instance methods do you need to define? Would your algorithm be easier to write if your board were stored in a different way?

What are the tradeoffs between storing the board as a 4x4 array of arrays vs. a single 16 element array?

Resources

boggle-2's People

Contributors

jalletto avatar jyoung217 avatar karaajc avatar

Watchers

 avatar  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.