Giter Club home page Giter Club logo

blokish's Introduction

Blokish

blokish

Blokish

Open-source Android implementation of the popular board game Blokus. With very smooth Drag & Drop user interface.

Get it on F-Droid

The rules

Blokus is family game involving four players and a board with 20 x 20 squares. Like chess or checkers, it's a game for which at any time you can see your opponent's pieces.

Each player starts with 21 pieces : 1 monomino, 1 domono, 2 triominos, 5 tetraminos and 12 pentaminos. It may recall you the Tetris polyominos...

"For first round, I must place a piece so that it touches one of the corners of the board"

"Next, a piece must be placed so that it touches a corner of one of my own pieces. It may touch several corners, but never any side/edge of my pieces!" Look at screenshots.

The game has a nice and natural User Interface : just Drag & Drop the piece with the finger. Rotate a piece likewise. And return a piece with a long press.

"If a cannot place any more piece I pass my turn."

The end of the game is reached when every player passes. "My score is : addition of the squares of the pieces I placed".

Refer to 'Menu > Help' inside the app. With several screenshots.

You can safely quit at any time : your current game will be restored on next startup.

Last piece played is displayed both enlarged and with higher contrast.

You play against the machine. You can configure the level of corresponding Artificial Intelligence : 4 levels. Refer to Menu > Preferences

You can disable AI for a human play only. Refer to Menu > Preferences.

Once installed, you can play off-line.

Menu

There is a drawer menu. Drag it from left side. With menu items :

  • settings
  • undo
  • new game

GPL v3 Licence

The game is free. And even more : the code is open-source. You can access it at http://github.com/scoutant. You can reuse and adapt it according to GPL v3 license.

You may post issues at http://github.com/scoutant/blokish/issues

Stephane Coutant, http://scoutant.org


Changelog

v3.5, 2022/11 : Android 12.1

  • targetting Android 12.1
  • built with Android 13 sdk and Gradle 7.5
  • from nom on : available on Android 9+

v3.4, 2020/04 : Android 10 and AndroidX Jetpack libraries refactoring

  • build with Android 10, from nom on : available on Android 7+
  • refactored Manifest and source dir
  • Github-CI build with tests

v3.3, 2018/06 : locale nl, Android 8.1

  • locale nl, credits to Vistaus
  • now targetting Android 8.1

v3.2, 2018/01 : Added locale pt-rBR, thanks @afmachado

v3.1, 2017/05 : menu now with drawer, removed multi-player network support with PlayHub

  • build with Sdk Android 7.0
  • refactored menu : now using drawer
  • removed PlayHub dependency
  • better german translation

v3.0, 2015/11 : Network multi-player support with PlayHub

  • Network multi-player framework PlayHub.
  • build with Sdk Android 6.0

v2.4, 2015/06 : Move validation possible directly on piece.

  • Smarter move validation : vibration and green color as soon move is valid
  • Validation by double tap on piece
  • sdk Android 5.1

v2.3, 2015/03 : Russian translation

  • added Russian translation, credits to Boris Timofeev.
  • sdk Android 5.0

v2.2, 2014/10 : Added button to open menu for phone without menu button

  • build with Gradle v2
  • sdk Android 4.1

v2.0, 2012/09 : German locale

  • added German locale, credits to Sascha Hlusiak
  • fix translation for screen "Level", in locales en, fr, es, sv

v1.9, 2012/07 : Drag and Long-press, tablets

  • fixed minor drag inconsistency
  • fixed minor long-press inconsistency on tablets. Used to flip a piece. Can still be done using the menu.
  • fixed bottom layout : on tablets the score was little bit off its control.
  • fixed code warnings revealed by ADT v20.

v1.8, 2012/04 : Animations

  • added a drop animation when a piece is moved, for user to better experience the lasts moves
  • removed dependency to heyzap, the social feature that did not meet great interest
  • added link to YouTube demo help page. http://www.youtube.com/watch?v=3Q7ow07uaMw

v1.7, 2012/03 : Swedish locale

  • migrated to Android 2.2
  • added social feature, powered by Heyzap : you may checkin and if you win game you may post your score...
  • added local SV_SE

v1.6, 2011/12 : Locales fr and es

  • Added locales FR, ES
  • Fixed endgame issue #3 : #3
  • minor layout refactoring with density-independent pixels

v1.5, 2011/10 : UI feedbacks

  • Added wheel animation to illustrated AI in progress
  • Last piece for each player is displayed both enlarged and with higher contrasts
  • vibration feedback whenever AI plays a move Thanks to those feedbacks, AI thinking duration is set to be longer, resulting in a global higher level.

v1.4, 2011/08 : AI with multi-turn processing

  • Advanced AI with multi-turn processing better mimicking human strategy.
  • Drag & Drop fix for large screens and new app icon.

v1.3, 2011/06

  • Added feature : save game on exit and load it on next start. Splashscreen vanish more quickly when game loaded.
  • Added preference 'Exit popup'. Enabling/disable the popup confirmation when exiting. With those 2 features, you can have a one click close and a quick reload. Suitable in busy situations.
  • Minor bug fix : menu option 'back one move' now ok even for fresh new game.

v1.2, 2011/06

  • Added capability to flip a piece to it's mirror position using the menu. As before, can also be done with a long-press gesture directly onto the piece. The menu alternative may be useful for large devices like tablets where long-press may conflict with DnD gesture...

v1.1, 2011/05

  • Added capability to disconnect AI, for human play only. AI can be enabled/disabled at any time during the game.
  • Added haptic feedback when dropping piece that is valid
  • Gracefully adapting AI level to CPU capabilities.
  • Refactored AI with initial seeds sort before looping around the best seeds.

v1.0, 2011/05

  • Added additional AI level
  • Fix for small screens : gracefully adapting the bottom pieces stores to be single-line
  • Fix bug : I2 and I4 moves happened not to be displayed as valid at the very border (according to orientation).

v0.5, 2011/05

First release

blokish's People

Contributors

afmachado avatar alondene avatar btimofeev avatar nixxan avatar poussinou avatar scoutant avatar shlusiak avatar vistaus avatar williamtheaker avatar

Stargazers

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

Watchers

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

blokish's Issues

an ActivityNotFoundException bug

Hi, thanks for developing this interesting app. We recently tested this app by an automated Android GUI testing tool developed by our research team. We found the app could run into an "ActivityNotFoundException" error after executing the following actions:

start the app -> press menu -> click "help" item -> click the video

We tested this app on a Android phone with SDK 4.4.4, and tested both a previous old version and the newest version. In both cases, the app crashed under the above sequence.

Here is the log:

E/AndroidRuntime( 3703): FATAL EXCEPTION: main
E/AndroidRuntime( 3703): Process: a3e.process, PID: 3703
E/AndroidRuntime( 3703): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=vnd.youtube://3Q7ow07uaMw }
E/AndroidRuntime( 3703): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1632)
E/AndroidRuntime( 3703): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
E/AndroidRuntime( 3703): at android.app.Activity.startActivityForResult(Activity.java:3553)
E/AndroidRuntime( 3703): at android.app.Activity.startActivityForResult(Activity.java:3514)
E/AndroidRuntime( 3703): at android.app.Activity.startActivity(Activity.java:3756)
E/AndroidRuntime( 3703): at android.app.Activity.startActivity(Activity.java:3724)
E/AndroidRuntime( 3703): at org.scoutant.blokish.Help$1.onClick(Help.java:19)
E/AndroidRuntime( 3703): at android.view.View.performClick(View.java:4444)
E/AndroidRuntime( 3703): at android.view.View$PerformClick.run(View.java:18445)
E/AndroidRuntime( 3703): at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime( 3703): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 3703): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 3703): at android.app.ActivityThread.main(ActivityThread.java:5135)
E/AndroidRuntime( 3703): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3703): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 3703): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
E/AndroidRuntime( 3703): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
E/AndroidRuntime( 3703): at dalvik.system.NativeStart.main(Native Method)

The suspicious code may be in Help.java:

screen shot 2016-04-13 at 11 26 21 am

Could you please take a look and confirm this bug? Thanks!
Ting Su

Piece flip feature

Hi! Nice game.. recently played blokus and was interested in the strategy!

One issue I notice is that flipping/reversing pieces is not possible (or if it is possible, I haven't figured out how to do it yet)
I would like to see that as one of the options which i feel i do all the time in the physical game..
One way to do it that I would approach from a user UI perspective is adding a mirror option along with the Cross and Check mark so that the piece is flipped..
Once I have some free time I would like to add it to the code myself, but if anyone else is able to get to it before, that would be great too!
Cheers..
blo1
blo2

Draw?

Not sure if this is a bug or not. What should happen in the event of a draw?

I got 74 points, green got 74 points. The game said "Player Green wins with score: 74"

bug: Doing moves for AI players

When you press on one of the tabs to show the remaining tiles of a player you can not only see his remaining tiles, you can also do moves with that players tiles.

User Controls AI Color after Toggling On Artificial Intelligence

EXPECTED BEHAVIOR

Turning on Artificial Intelligence causes the AI to play the current turn if belonging to Green, Blue or Yellow.

ACTUAL BEHAVIOR

Player must play the current turn when if belonging to Green, Blue or Yellow after activating Artificial Intelligence for those colors.

HOW TO REPRODUCE

  1. Launch Blokish 3.2 on Android 8.1.0
  2. Start a New Game
  3. Drag Right from Left Side of Screen
  4. Tap Settings
  5. Tap Artificial Intelligence to Toggle Off
  6. Tap Back to Close Menu
  7. Play a valid move for Red
  8. Repeat Steps 2 & 3
  9. Tap Artificial Intelligence to Toggle On
  10. Tap Back to Close Menu

TESTING ENVIRONMENT

  • Device: Pixel 2 XL
  • OS: Android 8.1.0
  • App Version: 3.2

RECORDING OF THE BUG

ToggleAI.gif



Posted on Utopian.io - Rewarding Open Source Contributors

Dragging Object from Left Side of Selection Pane Causes Multiple Issues

EXPECTED BEHAVIOR

The user is able to drag an object from the left hand side of the object selection pane into the game board.

ACTUAL BEHAVIOR

Attempting to drag an object that is on the far left side of the selection pane results in the menu opening up, the selected object becoming misaligned in the pane, and the object selection pane no longer being possible to move left/right.

HOW TO REPRODUCE

  1. Launch Blokish 3.2 on Android 8.1.0
  2. Start a New Game
  3. Drag the Object Selection pane to align a piece with left side of screen
  4. Tap an Object that's against the left side of screen and drag right
  5. Swipe Left to close menu that opened
  6. Attempt to move left or right in Object Selection pane

TESTING ENVIRONMENT

  • Device: Pixel 2 XL
  • OS: Android 8.1.0
  • App Version: 3.2

RECORDING OF THE BUG

DragMisalign.gif



Posted on Utopian.io - Rewarding Open Source Contributors

Red has moves!

I got the "Red has no more moves" dialog when I definitely had moves left.

Latest source?

There is a version 1.4 in Google's market, but the source here seems to be much older. Is there newer source elsewhere?

AI players miss possible moves

I've noticed that the game often ends with an AI player holding a 3-block "L" piece that they could have, but didn't, place.

I've attached screenshots of two games. Both screenshots were taken after the game ended. In both games, an AI player was holding an "L" piece they could have placed.

screenshot_1

screenshot_2

Cannot toggle ai state for players individually

It's great that you can play vs 4 ais in solo or 4 player (or nasty duel) mode. But it would be nice to be able to play with 1, 2, 3, or 4 ai players). It would also be nice if there was the option to have a random player go first rsther than alsways the human, playing red.

Unable to Rotate 5-Block Line in Upper Left Using Bottom Circle

EXPECTED BEHAVIOR

The user is able to rotate the 5-Block Vertical piece while placed in the upper left corner of the game board by using the lower circle.

ACTUAL BEHAVIOR

The user is unable to rotate the 5-Block Vertical piece while it is placed in the upper left corner of the game board due to either activate the Drag-Right Menu or moving the piece from its location.

HOW TO REPRODUCE

  1. Launch Blokish 3.2 on Android 8.1.0
  2. Start a New Game
  3. Drag the 5-Block Vertical piece to upper left position
  4. Attempt to Tap and Hold on Lower Circle and Drag to Rotate

TESTING ENVIRONMENT

  • Device: Pixel 2 XL
  • OS: Android 8.1.0
  • App Version: 3.2

RECORDING OF THE BUG

CannotRotate.gif



Posted on Utopian.io - Rewarding Open Source Contributors

Game Play Doesn't Reset or Restart Upon Exit , Hence Providing No Means To Start A New Game..

Expected behavior

One would expect the app to restart and provide a new frame on which they can start a new game after exiting and relaunching the app.

Actual behavior

The app doesn't restart after exit, instead it is back to last state with all the moves and changes still intact upon relaunch. In other words, if a player had moved two blocks or any number of block, even after exiting the game and relaunching, those moves are still intact.

How to reproduce

  • Launch Blokish
  • Play the game for a while.
  • Exit the game
  • And then relaunch.

Testing Environment.

  • Browser: Google Chrime
  • Operating system: Android Version 7 (Nougat)
  • App Version: Blokish v3.2

Recording Of The Bug

20180313215702.gif



Posted on Utopian.io - Rewarding Open Source Contributors

Better multiplayer

Hi,

Thanks for writing this app, it's fun. I wanted to play multiplayer with a mix of humans and AIs (so, for instance, I could play with my wife and two computer players). It turns out it was pretty simple to make that happen - I have a fork at https://github.com/matt-gardner/blokish where it appears to be working (though there may be a bug or two at end game, because it currently only checks for redOver). I know this is a pretty old project - would you be interested in merging these changes, or should I maintain my own fork? If you are interested, I'll clean it up (fixing spacing, and some other issues) and submit a pull request.

Block Becomes Stuck after Dragging Multiple onto Game Board

EXPECTED BEHAVIOR

Blocks dragged onto the Game Board without their placement being committed to can always be moved.

ACTUAL BEHAVIOR

If two Blocks are dragged onto the Game Board with neither's placement being committed to, the first one to have been placed cannot be moved even when it is selected.

HOW TO REPRODUCE

  1. Launch Blokish 3.2 on Android 8.1.0
  2. Start a New Game
  3. Drag an Object onto the Game Board
  4. Drag a second Object onto the Game Board
  5. Select the first object by tapping it
  6. Attempt to drag the first object

TESTING ENVIRONMENT

  • Device: Pixel 2 XL
  • OS: Android 8.1.0
  • App Version: 3.2

RECORDING OF THE BUG

BlockStuck.gif



Posted on Utopian.io - Rewarding Open Source Contributors

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.