Code Monkey home page Code Monkey logo

black-and-white's Introduction

Black & White

A colourful grid-based puzzle game for Pythonista on iOS by Chris Wilson

Black & White is a colourful grid-based puzzle game created using Pythonista on iOS. This code is intended to be used within the Pythonista app.



Installation

Download or clone the repository to Pythonista's file system and run main.py using the Python 3 interpreter.

Pythonista Tools Installer provides an easy way to do this. Black & White is listed in the library under Games.


Configuration

The config.ini file contains modifiable configuration information. There are currently settings for two size classes in the [LAYOUT_SMALL] and [LAYOUT_LARGE] sections. These may need to be adjused for different screen sizes. You can also customise in-game messages and other aspects of the game.


Instructions

  • The aim is to score points by clearing a white path across the black and white grid. Tapping a square locks it and toggles the colour of the eight surrounding squares.

  • When the path is cleared, tap the central button at the bottom of the screen. This happens automatically when the timer runs out.

  • If successful, tapping the timer will proceed to the next level. Otherwise, tap it to start a new game. The timer gets quicker with each level!

  • There are three power-ups at the top of the screen. You can get more by collecting stars. They can be very helpful, but not using them may have other advantages! The power-ups effects are as follows:

    • Toggle all squares
    • Unlock a tapped square
    • Toggle a single square (but not its neighbours)
  • Points are awarded for maximising the number of squares in the path, and points are deducted for unused white squares and locked squares (ones you have tapped). Your score in a round may end up negative!


Settings

The cog icon in the top left will take you to the settings screen where you can select a difficulty level (which affects timer speed and power-ups), change the username and set a custom colour scheme. For more detailed instructions, you can view the in-game help screen by tapping the ? button on the settings screen.


Highscores

The high score leaderboard can be viewed by tapping the icon in the top right. There is a separate table for each difficulty setting. Scores are stored for each user name using a local SQLite database.

black-and-white's People

Contributors

brandonmburroughs avatar chriswilson1982 avatar omz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

black-and-white's Issues

Python3: TabError

flake8 testing of https://github.com/chriswilson1982/BlackAndWhite on Python 3.6.2

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./black_white.py:435:15: E999 TabError: inconsistent use of tabs and spaces in indentation
				p_list = []
              ^

1     E999 TabError: inconsistent use of tabs and spaces in indentation

few comments

  1. occasionally, i get a louder than usual lock noise, and the flip seems to happen wrong, like it locks the wrong cell. Could be my fat fingers, but It seems to come with an extra loud buzz..
  2. It would be nice to have a few second warning sound. On the later stages, I have run out of time unexpectedly when trying to plan a move.
  3. I noticed this is only a 1x game on the ipad -- any thoughts of making a regular resolution version? You may get more visbility that way in the app store. Or is this a template limitation?
  4. What exactly are the rules regarding score based powerups?

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.