GithubHelp home page GithubHelp logo

rcriddle's People

Contributors

yuffster avatar ggilmore avatar

Watchers

James Cloos avatar  avatar

rcriddle's Issues

Scrape a URL and return the crossword content from the <pre> tag

Expected return would look something like...

                                                                ┌───┐
                                                                │   │
                                                                ├───┤
                                                                │   │
                                                                ├───┤
                                                                │   │
                                                                ├───┤
                                                                │   │
                        ┌───┐                                   ├───┤
                        │ H │                                   │   │
                        ├───┤               ┌───┐               ├───┤
                        │ T │               │ L │               │   │
┌───┬───┬───┬───┬───┬───┼───┼───┬───┬───┬───┼───┤               ├───┤
│ L │ E │ V │ O │ R │ O │ T │ A │ T │ O │ R │ Y │               │   │
└───┴───┴───┴───┴───┴───┼───┼───┴───┴───┴───┼───┼───┬───┐       ├───┤
                        │ P │               │ C │ O │ M │       │   │
                        └───┘               ├───┼───┴───┘       └───┘
                                            │ E │
                                ┌───┬───┬───┼───┼───┬───┬───┬───┬───┬───┬───┬───┬───┐
                                │ R │ E │ C │ U │ R │ S │ E │ R │ I │ D │ D │ L │ E │
                                └───┴───┴───┼───┼───┴───┴───┴───┴───┴───┴───┴───┴───┘
                                            │ M │
                                            └───┘

Convert crossword ASCII to multidimensional array

Given an input like...

"""

                ┌───┐
                │ W │
┌───┬───┬───┬───├───┤
│ H │ E │ L │ L │ O │
└───┴───┴───┴───┼───┤
                │ R │
    ┌───┐       ├───┤
    │   │       │ L │
    └───┘       ├───┤
                │ D │
                └───┘
"""

Generate an array like...

[
    [' ', ' ', ' ', ' ', 'W'],
    ['H', 'E', 'L', 'L', 'O'],
    [' ', ' ', ' ', ' ', 'R'],
    [' ', '?', ' ', ' ', 'L'],
    [' ', ' ', ' ', ' ', 'D']
]

Find Words

Given a structure like...

"""
[
    [' ', ' ', ' ', ' ', 'W'],
    ['H', 'E', 'L', 'L', 'O'],
    [' ', ' ', ' ', ' ', 'R'],
    [' ', '?', ' ', ' ', 'L'],
    [' ', ' ', ' ', ' ', 'D']
]
"""

Returns an array of the characters in all sets of contiguous tiles.

['HELLO', 'WORLD']

Rotate Segment

Given a data structure like (#2)...

[
    [' ', ' ', ' ', ' ', 'W'],
    ['H', 'E', 'L', 'L', 'O'],
    [' ', ' ', ' ', ' ', 'R'],
    [' ', '?', ' ', ' ', 'L'],
    [' ', ' ', ' ', ' ', 'D']
]

Return the rotated segment.

[
    ['W', 'O', 'R', 'L', 'D'],
    [' ', 'L', ' ', ' ', ' '],
    [' ', 'L', ' ', ' ', ' '],
    [' ', 'E', ' ', '?', ' '],
    [' ', 'H', ' ', ' ', ' ']
]

(Alternate representation)

"""
┌───┬───┬───┬───┬───┐
│ W │ O │ R │ L │ D │
└───┼───┼───┴───┴───┘
    │ L │
    ├───┤
    │ L │ 
    ├───┤   
    │ E │  
    ├───┤
    │ H │
    └───┘ 
"""

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.