alnah005 / konkan Goto Github PK
View Code? Open in Web Editor NEWFlutter game that is popular in my home country (Yemen)
Flutter game that is popular in my home country (Yemen)
Find a neat design for the icon of the app.
Since the app used to be solitaire and each player used to be a column, the last cards (or cards that are in order e.g. 4,5,6,7) can be added from one column to the other if the other column matches.
Example:
Column1 | Column2 |
---|---|
4 | 5 |
Then after moving 4 from column1 to column5
Column1 | Column2 |
---|---|
5,4 |
Players nowhere in the actual game are allowed to directly exchange cards.
The code to record games has copying and pasting so eliminating that would make more robust code.
This issue is focused on optimizing the PlayingCard
model by inserting most of the scattered functionality into the model.
We will need to establish a way to manage the flow of the app's pages.
For example, when the app starts it should first go to a splash screen then check if a user is logged in. If so, the user is sent to a home screen. If not he it should go to the login-screen. And so forth.
Currently all players can play out of turn (anyone can discard cards). Konkan can either play clockwise or anti-clockwise.
The bug persists on the devel branch.
Console log:
Launching lib\main.dart on sdk gphone x86 in debug mode... Running Gradle task 'assembleDebug'... √ Built build\app\outputs\apk\debug\app-debug.apk. Debug service listening on ws://127.0.0.1:50972/Ma49F9R-h8M=/ws Syncing files to device sdk gphone x86... I/Choreographer( 2946): Skipped 222 frames! The application may be doing too much work on its main thread. I/flutter ( 2946): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ I/flutter ( 2946): The following assertion was thrown during layout: I/flutter ( 2946): A RenderFlex overflowed by 33 pixels on the bottom. I/flutter ( 2946): I/flutter ( 2946): The relevant error-causing widget was: I/flutter ( 2946): Column file:///C:/Users/Pyromaniac/Desktop/Konkan/lib/pages/game_screen.dart:84:13 I/flutter ( 2946): I/flutter ( 2946): The overflowing RenderFlex has an orientation of Axis.vertical. I/flutter ( 2946): The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and I/flutter ( 2946): black striped pattern. This is usually caused by the contents being too big for the RenderFlex. I/flutter ( 2946): Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the I/flutter ( 2946): RenderFlex to fit within the available space instead of being sized to their natural size. I/flutter ( 2946): This is considered an error condition because it indicates that there is content that cannot be I/flutter ( 2946): seen. If the content is legitimately bigger than the available space, consider clipping it with a I/flutter ( 2946): ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, I/flutter ( 2946): like a ListView. I/flutter ( 2946): The specific RenderFlex in question is: RenderFlex#d13d9 relayoutBoundary=up1 OVERFLOWING: I/flutter ( 2946): needs compositing I/flutter ( 2946): creator: Column ← _BodyBuilder ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ← I/flutter ( 2946): CustomMultiChildLayout ← AnimatedBuilder ← DefaultTextStyle ← AnimatedDefaultTextStyle ← I/flutter ( 2946): _InkFeatures-[GlobalKey#4eeac ink renderer] ← NotificationListener<LayoutChangedNotification> ← I/flutter ( 2946): PhysicalModel ← AnimatedPhysicalModel ← ⋯ I/flutter ( 2946): parentData: offset=Offset(0.0, 80.0); id=_ScaffoldSlot.body (can use size) I/flutter ( 2946): constraints: BoxConstraints(0.0<=w<=411.4, 0.0<=h<=603.4) I/flutter ( 2946): size: Size(411.4, 603.4) I/flutter ( 2946): direction: vertical I/flutter ( 2946): mainAxisAlignment: spaceAround I/flutter ( 2946): mainAxisSize: max I/flutter ( 2946): crossAxisAlignment: center I/flutter ( 2946): verticalDirection: down I/flutter ( 2946): ◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤ I/flutter ( 2946): ════════════════════════════════════════════════════════════════════════════════════════════════════
Add the joker cards to the deck.
Here are the penalties of each card:
Cards that were set do not contribute to the penalty.
Some ideas (We don't need to stick to these ideas):
DROPPED deck is draggable once there are cards. However, when dragged, cards in the bottom of the deck disappear.
I had a 4 4 4 J and tried melding a joker
A game state class must be created to make online games with multiple players possible.
The game state class must have enough information for the game to function properly, but not too much information for someone to hack the game using the gamestate, but that can ignored if it's too difficult.
Game state must have these:
UI that would reflect the following:
Currently on b9c4e81 players are not able to set their cards in the code. However, players do have a set cards deck in the Player.dart file List<PlayingCard> openCards
The purpose of this issue is the following:
game_screen.dart
:player.cards
to player.openCards
.player.cards
deckAfter 1b, hopefully the visualization will reflect the change.
Cards must have a more radiant design (better look, light shadow, animation,...etc)
App currently has a single page (game page).
At the very least there should be:
and optionally login page
Animations between pages and navigations.
Users should be able to toggle animations in the settings
This issue is to allow to have separate game logic from UI, so that different versions of the game can be easily created.
Currently players can only drag cards in a solitaire fashion (if a card has cards over it, you must drag them too). In konkan you must be able to both:
This can be resolved by either using swapping between cards, or having a scratch space to drop cards in
Players can only organize their cards by clicking on them and not by dragging and dropping to a specific spot.
If a player has not set his cards, he should not be able to set unless the card he drew from the discarded cards deck is put into one of his groups.
Have some audio when a player does certain actions
Currently only cards that are in the players hands are visualized.
Grouping is now achieved through the validate
function in models/groups.dart.
It returns a list of Meld objects of the possible outcomes, arranged by penalty value.
In the case of no possible outcomes, the function returns an empty list.
There are multiple files in the software which can be clustered based on function
Currently in e8e83fa given a grouping (e.g. List<List>) a score is generated and moved to set cards if conditions are acceptable. However, the grouping has not been generated by the logic.
There are many ways this can be solved:
Currently the players are vertical columns on the screen. Ideally, each player would be in a space based on the PositionOnScreen
variable.
The background should be fitting to an online multiplayer game
The game currently has a lot of code scattered around game_screen.dart
that handles the game logic using multiple explicit calls.
Ideally this is how the game needs to cycle using very few calls:
GameState.initializeGame()
currentPlayer = GameState.initializeTurns(Players)
while (gameNotOver):
GameState = currentPlayer.play(GameState)
if (GameState.checkWin()):
gameNotOver = false
break
currentPlayer = GameState.nextPlayer(currentPlayer)
GameState.trackStats()
The server must be able to communicate the following with the app:
and optionally we can track data usage of players
Widgets in game screen have a lot of redundant information, so it needs to be refactored to be more clear and concise.
This consists of:
None of this has to be in the UI (UI can be dealt with in a separate issue)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.