Giter Site home page Giter Site logo

openfool's Introduction

OpenFool

Travis Github All Releases Github Releases GitHub release Gitter

OpenFool - free and open source (MIT licensed) Fool (Durak) card game implementation for desktop and Android.

Get it on F-Droid

Features

Implemented

  • 4-players partnership game (2 vs 2), individual game for 2-5 players
  • 52-card decks: Standard Russian (designed by A. Charlemagne in 19th century, public domain - from Wikimedia), international (by Chris Aguilar - LGPL v3), French deck (by David Bellot - LGPL v3), stripped deck variants (24, 32 and 36 cards)
  • Standard rules for throwing in and passing (the latter is optional)
  • Some conventions may be customised

Planned

  • Individual and partnership play for 6 players (3 vs 3)
  • Customisable player names (both AI and human)
  • Statistics
  • Online play (via custom server)
  • More deck designs
  • More customisable rules (e.g. Japanese fool or spade-on-spade)

How to build

It's a Gradle project. Run

./gradlew :desktop:run

to run the desktop version

openfool's People

Contributors

bulat-f avatar eighthave avatar poussinou avatar trolley813 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openfool's Issues

Misclick leads to accidental pickup

Shall picking up while defending be a separate button, not just any click on the playing field?

Or shall attempt to pick up while there is ability to beat the card require some confirmation window?

Arbitrary number of players

Allow to play with any number of players between 2 and 6, and choose between individual and partnership play.

Building from sources

How to build form the sources on linux? I've not seen Makefile or something like that.

By the way, when I see project of this kind I expect to see certain 'file system'. E.g. like this:

[dir] src
[file] README.md
[file] LICENSE
[file] Makefile

Throw limit as being ignored

In 0.1.5, some game features don't work as expected. For example, it is possible to throw more cards than the defender has.

Android port

The game should be playable on Android devices.

  • Add to Qt project
  • Resize cards and buttons
  • Make native Settings dialog
  • Native controls if possible

Move goes straight to waste

In 2 player mode, perhaps once in 2-3 games, an attempt to attack goes straight to waste stack, leaving odd number of cards in play.

Localisation

Provide translation of menu items etc. to other languages (especially Russian).

Wrong game finishing

Sometimes game "freezes" if it's turn of player which has no cards (i. e. is out of play). Then, his/her partner must attack.

[FR] make fullscreen mode optional

the game works fullscreen. This keeps the player "cut" from the other phone events (status bar hidden).
Good for some, bad for others.

Beating vs. passing

Game does not allow choice between passing and beating if the same card can be used for both. Ie. if you have a trump card with the same rank as the one you are attacked with, you can only use it to pass, not to beat.

AI throws to itself

In 3-player mode at least, after a pass AI players will add cards against themselves, sometimes causing it to take.

Crash at launch - missing libgdx.so

I have installed 3.0 from F-Droid on my Xiaomi Redmi Note 8 Pro (Android Pie), and I get a crash at startup, immediately after the app rotates the screen to landscape.

java.lang.ExceptionInInitializerError
	at java.lang.Class.newInstance(Native Method)
	at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
	at android.app.Instrumentation.newActivity(Instrumentation.java:1215)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2895)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3114)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:113)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:71)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:201)
	at android.app.ActivityThread.main(ActivityThread.java:6831)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:927)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'gdx' for target: Linux, 32-bit
	at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:125)
	at com.badlogic.gdx.utils.GdxNativesLoader.load(GdxNativesLoader.java:33)
	at com.badlogic.gdx.backends.android.AndroidApplication.<clinit>(AndroidApplication.java:60)
	... 15 more
Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/ru.hyst329.openfool-5fmrYz3syYdWZnAHMfFQQQ==/base.apk"],nativeLibraryDirectories=[/data/app/ru.hyst329.openfool-5fmrYz3syYdWZnAHMfFQQQ==/lib/arm64, /system/lib64]]] couldn't find "libgdx.so"
	at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
	at java.lang.System.loadLibrary(System.java:1669)
	at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:119)
	... 17 more

Same on another device with Android 10 and custom ROM.

This issue manifests itself only on F-Droid version. The build from github release is OK.

Fix AI

Now, the AI tends to throw higher cards - trumps, aces and face cards. For example, the trump ace can be thrown at the very beginning of the game, which is quite irrational.

Functional request

For chess, backgammon and Go there are analyzers of played games. I suggest to develop a similar analyzer for the Fool: load the base of played games and from the selected step AI offers options for moves. Such approach will allow to develop not another fool, but a qualitatively different project.

Application quits improperly

When a user presses close button while game is in progress, the application does not quit properly - it causes unpredictable behaviour (it can even get into a loop with memory allocation and runs until a bad_alloc being thrown).

New sub-rules

добавьте, пожалуйста, новые подправила для выбора:

  1. пики-пиками.
    работают параллельно козырям, но с мастью пики козыри неработают.
    переводить можно как обычно, если игра в 'переводного'.
    если при выборе козыря выпадает мастью пики, эту карту произвольно убирают в колоду, на место козыря кладут следующую, и т.д.

  2. 54 карты.
    участвуют ещё два джокера, джокеры старше тузов, джокер козырного цвета является джокером козырной масти.
    при 'пики-пиками' чёрный джокер авляется также и 'пикОвым', может крыть пики.

App icon

To better distinguish the app, it should have an icon.

Web site

There was something about releases page in announcement (in vk). But I could not find web site to see it. Could you provide url of this web page?

Game crashes when background was not set

If you haven't set the background number in the settings (e. g. after fresh install), the game crashes on start, because it attempts to load background number 0, which doesn't exist.

Bug in individual game

When the loser cannot beat (and therefore takes) the cards on the last turn, the game won't finish.

Card sorting

Implement sorting of cards:

  • sorting by suit with alternated colors, by rank inside each suit and trumps being highest.
  • sorting by rank and by suit inside each rank.

Wrong throw limit

Sometimes, the game doesn't allow throwing cards even when the true throw limit isn't exceeded. The source of this behaviour is already found.

2:1

Does the selected background apply to the main screen? And I have a 2: 1 background on the screen in the squares of 16: 9, and the remaining sides are green.
Screenshot_2019-08-23-05-22-32-999_ru hyst329 openfool

[FR] Wi-Fi Direct Ad Hoc Multiplayer

Hi,
is a wifi direct/ad hoc mulitplayer mode planned in some way? This would have the benefit that no server infrastructure is needed to play with firends when meeting. Also you don't have to cary physical cards with you.
Another nice addtion would be statistics with every connected friend about wins/loses.

Settings

Allow the user to edit some settings related to appearance, rules and deck used in the game.

  • Player names
  • Rules setup
  • Deck setup
  • Other appearance-related settings (colors, fonts, animation speed etc.)

Throwing options for 4+ players

For 4 (and more) players, now only neighbours can throw. The option allowing all players to throw should be introduced. Also, team option for 6 players (3-on-3) should be playable (for 8 players, 4-on-4).

Passing

Allow to pass the attack to the left-side neighbour when no cards have been beaten, by adding a card of same value than the attacking card(s).

random doesn't work in OpenFool 0.0.9 Qt 5.5.1 win32

Приветствую.
У меня вопрос по Qt5 версии (0.0.9), я знаю, вы ее уже не разрабатываете, но может подскажете. У вас на странице релизов есть сборки для Android и Win7+ (Qt 5.8). Поскольку я пользуюсь Ubuntu 16.04 i386 (Qt 5.5.1), я скомпилировал для себя, приложение запускается, random работает. У меня нет Win7, но в вашей сборке OpenFool-0.0.9-windows.7z (Qt 5.8, Win7+), запущенной в Wine, random тоже работает. Однако я хотел сделать сборку для пользователей Windows XP (у меня есть в dualboot). Последний Qt, который ее поддерживает, это Qt 5.6. Но реально запустить оказалось только QtCreator 3.5.1 с Qt 5.5.1 на XP. Игра скомпилировалась, на XP запускается, но я заметил такую проблему. При каждом запуске игры одни и те же карты, т.е. не работает random. Я проверил в виртуальной XP - те же карты, проверил в Wine - те же карты. Так что здесь есть:

  1. либо какой-то баг, который проявляется в win32 + Qt 5.5.1 (потому что в линуксовом Qt 5.5.1 всё ok)
  2. может быть я не установил какой-то SDK перед сборкой

Я нашел упоминание random в файле carddeck.cpp. Это #include <random>, CryptAcquireContextW и CryptGenRandom. Это майкрософтовские функции, которые поддерживаются в XP и Wine, но почему-то не срабатывают у меня. Не срабатывают именно в сборке win32 + Qt 5.5.1. Причем, и в Wine.
Не подскажете в чем причина и как исправить, чтобы random работал?

Я знаю, конечно, Qt5 версия недоделана. Там, например, нельзя менять количество игроков. В моей сборке почему-то не применяется локализация (это мелочи). Но игра мне понравилась. И хотя я пользуюсь в основном Linux, где всё ok, я бы хотел также чтобы XP версия (Qt5.5-5.6) нормально работала. Может быть икспишникам понравится.

Build on Linux

I have a trouble with building on Linux. I run qmake ../OpenFool.pro (not just OpenFool). After I try to execute make release, but Make say target is not fund. Okay, I run make and it start to compile, but I receive error message again.

../table.h:17:5: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
     Table(QObject *parent = nullptr);
     ^

What am I doing wrong?

New UI skin

New skin should be prepared for the consistent UI design.

Accented letters for Czech

When the language set to Czech, some of the acented letters do not apear because they are not supported by the UI font.

Installer

Create Windows installer (and possibly for other platforms).

Can throw more cards than allowed

In the endgame, if a player has less than 6 cards, and announces the taking, opponents can throw more cards than he/she has, which is forbidden by the rules.

Rules setup

Add some convention to settings. For example:

  • limit first discard to 5 cards;
  • ace can be beaten with the lowest card (a deuce) of the same suit, etc.

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.