timtam / cards-against-humanity Goto Github PK
View Code? Open in Web Editor NEWCards against humanity client and server written in python
License: MIT License
Cards against humanity client and server written in python
License: MIT License
When a game ends, the players won't be informed who's actually won this game.
game entry should inform the user if a password is required for this game or not
The user should be able to notify the server about wrong cards, means cards which contain grammar or ortography mistakes or too few placeholders and such stuff. Maybe by using the right mouse click?
Users should be able to determine the current amount of cards in the database inside the editor.
Profiling results in 0.06 seconds for each panel creation. Each card contains even 2 panels, which results in 0.12 seconds per card. With a small database including 60 cards we already got 7.2 seconds loading time on database loading or search. That's alot, considering the databases will be 10 times that large, which means waiting for over one minute until all cards are rendered.
Possible solutions:
Currently the button calculates his position and size by the text length once on creation time. We need to be able to change the text on the go to support situations like follows:
Login sound not played anymore
The server should be able to specify a server message which will be displayed in the client when connecting to it. This can for example contain the list of servers this address provides or the limitations this server offers.
When adding multiple cards in a row, it would be helpful to place the new card button right above the right window. This minimizes the mouse movement the user has to do in order to create new cards
We probably have black cards which end placeholders with either whitespaces (in the middle of a sentence) or punctuation (end of a sentence). white cards can now contain punctuation at the end, which are misplaced in any of the both previously mentioned cases. Thus punctuation should be forbidden in white cards.
title says it all
Messages like out-dated client information won't be shown, connection lost messages will be shown instead
When pressing keys like u or n inside the main window (even in text inputs), they won't be accepted. I guess that's because they are assigned to the menu items (& sign). It's interesting why they aren't just used inside the menu anyway.
Currently the players will be disconnected after all games were saved. This may result in saving games which are yet open and not contain 3 or more players, which will result in errors because when they're loaded they are considered closed.
There are two possible attemps to fix this:
Putting them both in one will fail when someone suspended/left a game, because you'll only be able to leave the game permanently then.
The client should be able to see how many people currently are inside a game without joining it
Since games get deleted as soon as you join them, points won't be saved client-side anymore.
client should only see the games who can actually join (if he knows the password), but not currently running games or paused games which aren't open anymore.
Those adaptions need to be done:
All utilities (server, client, editor) should be packed into separate archives as separate applications, containing a valid version number each.
when searching only the simple letters e, r, t, i, a, s, h, n and also the '.' (dot) and then deleting them (clear searchbar with backspace, not with the cancel button) only the first row of cards is displayed correctly. on the second row and below the texts have a size of only maybe 10x10 px and is positioned on very top left of the card too.
my guess is that these letters and the dot are the most used characters in the cards texts and this could be related to the whole problem. i think this could be fixed with a simple Layout()-call on the right spot
The game log should contain the black card which was chosen by the czar and won the round.
When leaving a running game, the user should be asked if he really wants to leave the game, instead of leaving the game instantly.
new window layout needed (yes/no buttons and text display).
Texts translated into different languages resample into different lengths, which causes trouble with our current minimum sizes which relate to the english language only.
Translator support already exists, so we need to be able to switch the language on the login view and consider the choice for all other views too. This shouldn't be the problem in the client, we even don't need to restart the client manually.
Following things need to be done:
seems to be a font problem
Currently all black cards are used per game, which can result in really long games. It should be possible to
Holding down keys in input fields should generate multiple key presses instead of only one
When focusing one control with the keyboard and focusing another item with the mouse, you can create several conflicts, e.g. non-visual focusing (hover effect) or pressing two different buttons at the same time (one per keyboard and one per mouse).
Possible solution:
When leaving a game which was previously running and dropping the user count to 3, the amount of rounds will be reset in server, but not in the client. It will stay the same amount of rounds it previously was before leaving the game.
When interrupting the connection between server and client by force, the server probably won't notice until he shuts down or he has to wait quite a long time.
Solution:
the server and client should implement a keep-alive signal which forces the server to disconnect users if keep-alive response wasn't received properly in a certain amount of time.
Writing cyrillic signs with the default font doesn't work. Following solution:
Using key combinations like Ctrl+H, users can enter nonrecognizable unicode letters into input fields, which shouldn't be possible.
When two players are in a game and the first one leaves the game, the second one will see himself as unchosen
Game creator needs to be able to delete a game he created from overview view.
Includes the following:
We're missing sfx for game ends (you win, you tie, you lose)
When the creator decides to leave the game, no creator will be left. Thats why the creator needs to be pushed to the next user so that the game will always stay with a creator.
The starting game text if the player himself starts the game lacks some translation
It seems that the wrong winner for this round is announced by the server
When leaving a game which is still available (people inside or open) it will apear in the client's list twice, due to wrongly sent event.
Suspend function should be the second function of the start game button and the leave game button should be fixed to the button which currently inherits the suspend game functionality
Currently the port is fixed to 11337. It should be possible to define the port in the server as well as in the client. This should make it possible to host multiple servers on one device.
line break function for scrolled panels always uses the last letter at the beginning of the next line again.
Currently you can just click onto an input field to set focus into it, but you can't click onto a certain letter to move the cursor towards this letter, you need to do this with the arrow keys. This should be possible with mouse too.
Run-Log:
C:\Python\Python27\python.exe E:/GitHub/cards-against-humanity/editor.py
Traceback (most recent call last):
File "E:\GitHub\cards-against-humanity\editor\cardlist_toolbar.py", line 47, in newCard
panel = frame.left_window.card_grid.addCard(id=cursor.lastrowid, text='', card_type=CARD_WHITE)
File "E:\GitHub\cards-against-humanity\editor\cardlist.py", line 134, in addCard
self.grid.Add(card, 1, wx.EXPAND | wx.ALL,
File "C:\Python\Python27\lib\site-packages\wx-3.0-msw\wx_core.py", line 16711, in getattr
raise PyDeadObjectError(self.attrStr % self._name)
wx._core.PyDeadObjectError: The C++ part of the GridSizer object has been deleted, attribute access no longer allowed.
Currently, if no text is entered into the search box, the text "search" is displayed, no matter which language is currently selected. This text needs to be translated.
It seems that the final point (e.g. in a tie) doesn't count.
Example:
It's 3:3:2, the last player gains a point, but he's announced the loser, while both others win a tie.
The game log should contain the final points when ending a game
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.