{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":781575546,"defaultBranch":"main","name":"truco","ownerLogin":"drukpa1455","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2024-04-03T16:36:04.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/136856552?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1712162164.0","currentOid":""},"activityList":{"items":[{"before":"3df2fa20cce91238786589a536d6fdd1c592c92b","after":"889af62736c5db160a23175f2a998aa0aafcead7","ref":"refs/heads/main","pushedAt":"2024-04-05T21:22:42.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"readme","shortMessageHtmlLink":"readme"}},{"before":"0715e48ab8a0be5bc78a62c7e0f3b74605e81c6f","after":"3df2fa20cce91238786589a536d6fdd1c592c92b","ref":"refs/heads/main","pushedAt":"2024-04-05T00:16:25.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"updated total points, envido points, flor points, and truco points tracking; total points now tracked in scores list of Game class; Envido points calculated based on specific rules of game, get_envido_points method calculates Envido points for player based on hand, Envido points are added to winner's score when Envido called and accepted; Flor points calculated using get_flor_points method, if player has three cards of same suit they are awarded Flor, Flor points added to winner's score when Flor is called and accepted; when Truco is called and accepted, truco_value is set to TRUCO_POINTS, which is currently set to 2, this value is added to the winner's score at the end of the round; play_round method displays current round number and scores of each player after eah turn; game ends when player reaches WINNING_SCORE; optimization and refactoring for redability and maintanability, comments and docstrings added to improve documentation; play_round allows players to pass their turn by pressing Enter without selecting a card; GameOver raise when player reaches winning socre and game terminated; main function added to start game","shortMessageHtmlLink":"updated total points, envido points, flor points, and truco points tr…"}},{"before":"5bbec0f5c17b53f5f34d2ee24358edbfff62b900","after":"0715e48ab8a0be5bc78a62c7e0f3b74605e81c6f","ref":"refs/heads/main","pushedAt":"2024-04-04T17:57:43.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"readme cleanup","shortMessageHtmlLink":"readme cleanup"}},{"before":"d2092c83f86f882725afe2b645b49d3290149cad","after":"5bbec0f5c17b53f5f34d2ee24358edbfff62b900","ref":"refs/heads/main","pushedAt":"2024-04-04T17:56:06.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"readme; modularize code and docstrings; implemented truco to raise stakes; added envidio for players to bet on strenght of hands; added flor for players to bet on having 3 cards of same suit; added option for players to pass turn; implemented maxo for players to draw card from deck to determine winner; added separate scording system for truco envidio flor to keep track of points earned in each category; improved user interface by displaying current round, scores, and player's turn more prominently... game is more interactive with prompts for calling truco envidio and flor; used type hints throughout the code to improve code readability and catch potential type-related errors; documented code with docstrings; organized code; handled edge cases; impelemeted GameOver exception","shortMessageHtmlLink":"readme; modularize code and docstrings; implemented truco to raise st…"}},{"before":"818309b86e6f5f3bddecf7f34c5340e2102cf9af","after":"d2092c83f86f882725afe2b645b49d3290149cad","ref":"refs/heads/main","pushedAt":"2024-04-04T17:14:28.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"todo","shortMessageHtmlLink":"todo"}},{"before":"a37e262768c2c05f742f86223e7f899072aaea66","after":"818309b86e6f5f3bddecf7f34c5340e2102cf9af","ref":"refs/heads/main","pushedAt":"2024-04-04T17:09:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"add new method in to clear table + reset player's hands + deals new cards from deck; modify method of class to call state.reset_hands() when round ends (either win or tie) to ensure table cleared and new cards dealth to players for next round; create new in function at beginning of game and shuffle which is then passed to method of to use for dealing new cards after each round","shortMessageHtmlLink":"add new method in to clear table + reset player's hands + deals new c…"}},{"before":"3f24d983a80b0241201f4d57477b1f5391241785","after":"a37e262768c2c05f742f86223e7f899072aaea66","ref":"refs/heads/main","pushedAt":"2024-04-03T19:10:19.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"move state.update_scores(winner) before printing scores round numbers and winner","shortMessageHtmlLink":"move state.update_scores(winner) before printing scores round numbers…"}},{"before":"843adf443d71b0bfcf66519dafc4d477f11ac528","after":"3f24d983a80b0241201f4d57477b1f5391241785","ref":"refs/heads/main","pushedAt":"2024-04-03T19:04:56.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"add new method reset_hands to State to reset hands to empty list, instead of calling state.reset_game() after each round now calling state.reset_ahdns() to reset player's hands while preserving scores, state.reset_game() method now only called when game starts or after winner determined","shortMessageHtmlLink":"add new method reset_hands to State to reset hands to empty list, ins…"}},{"before":"4a8e7ed7ae784acd7f6949844db94120698fb0c2","after":"843adf443d71b0bfcf66519dafc4d477f11ac528","ref":"refs/heads/main","pushedAt":"2024-04-03T18:58:35.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"move state.update_scores(winner) after printing current scores round number and winner of round to ensure scores updated correctly after displaying current state","shortMessageHtmlLink":"move state.update_scores(winner) after printing current scores round …"}},{"before":"0665af3b8c83c6b5483df694dc6ab2408be53b91","after":"4a8e7ed7ae784acd7f6949844db94120698fb0c2","ref":"refs/heads/main","pushedAt":"2024-04-03T18:54:16.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"add code to print current round numbers scores and winner of round in play method of Judger class, in case of tie add code to print scores","shortMessageHtmlLink":"add code to print current round numbers scores and winner of round in…"}},{"before":"1aea51226ee7fcd6c1cc80c0e10464dc5aade596","after":"0665af3b8c83c6b5483df694dc6ab2408be53b91","ref":"refs/heads/main","pushedAt":"2024-04-03T18:47:29.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"updated get_winner method in State class to correctly handle ties when both players play cards of same rank, added condition in play method of Judger class to handle ties after determining winner of trick","shortMessageHtmlLink":"updated get_winner method in State class to correctly handle ties whe…"}},{"before":"d1a3d8e4af79fac3056bbe385db720b66c433b27","after":"1aea51226ee7fcd6c1cc80c0e10464dc5aade596","ref":"refs/heads/main","pushedAt":"2024-04-03T18:43:51.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"play_game function moved debug print before state.play_card(card) line so printed before card is played, add print to siplay winner of each round after state.update_scores(winner) line","shortMessageHtmlLink":"play_game function moved debug print before state.play_card(card) lin…"}},{"before":"69e678da332d490fc3707c131b2385cec6efbaeb","after":"d1a3d8e4af79fac3056bbe385db720b66c433b27","ref":"refs/heads/main","pushedAt":"2024-04-03T18:38:49.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"implemented __eq__ for Card class to allow for more efficient comparison of cards, removed unnecessary parentheses in list comprehension in reset_game method, changed loop in deal_cards method to iterate over self.ahnds list directly removing need for enumerate function, removed unnecessary variable assignment and used more concise conditional statements in play method of Judger class, added mutually_exclusive_group to argument parser to ensure --test or --play specified, replaced if/else block at end of __main__ with parser.print_help() to print help message if no valid argument provided","shortMessageHtmlLink":"implemented __eq__ for Card class to allow for more efficient compari…"}},{"before":"1432ddb382c2059182f35f79282bddaea8c9c496","after":"69e678da332d490fc3707c131b2385cec6efbaeb","ref":"refs/heads/main","pushedAt":"2024-04-03T18:26:09.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"change HumanPlayer class to move incalid card outside try block","shortMessageHtmlLink":"change HumanPlayer class to move incalid card outside try block"}},{"before":"dfe870f7604b9145956450bed64429c93dfb5ec7","after":"1432ddb382c2059182f35f79282bddaea8c9c496","ref":"refs/heads/main","pushedAt":"2024-04-03T18:19:02.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"argparse, new play method to Judger class to debug, updated play_game for debug","shortMessageHtmlLink":"argparse, new play method to Judger class to debug, updated play_game…"}},{"before":"36eb0f57920d1fb41999222a97fe744ccad6d289","after":"dfe870f7604b9145956450bed64429c93dfb5ec7","ref":"refs/heads/main","pushedAt":"2024-04-03T18:12:28.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"replace judger.reset_game() with self.reset_game() in Judger class","shortMessageHtmlLink":"replace judger.reset_game() with self.reset_game() in Judger class"}},{"before":"0ee3bc8257ed081209ce470b8402605da977c79f","after":"36eb0f57920d1fb41999222a97fe744ccad6d289","ref":"refs/heads/main","pushedAt":"2024-04-03T18:09:33.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"add state = judger.reset_game() after determining the winner of a trick and updating scores, reset game state, including dealing new hands to the players and clearnign table before starting next trick","shortMessageHtmlLink":"add state = judger.reset_game() after determining the winner of a tri…"}},{"before":"661df0c4e91f9c927589e5fe1623f5e3a8477578","after":"0ee3bc8257ed081209ce470b8402605da977c79f","ref":"refs/heads/main","pushedAt":"2024-04-03T18:07:19.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"refactor gameplay loop, reset state after each trick, simplify play_game loop","shortMessageHtmlLink":"refactor gameplay loop, reset state after each trick, simplify play_g…"}},{"before":"b201f14f470406ae3c4a6c184ef18efd05798e0f","after":"661df0c4e91f9c927589e5fe1623f5e3a8477578","ref":"refs/heads/main","pushedAt":"2024-04-03T18:04:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"move state.table.clear() inside while loop in play method of Judger class","shortMessageHtmlLink":"move state.table.clear() inside while loop in play method of Judger c…"}},{"before":"9c390079380921071f1f1adad15f1c081e99e7a3","after":"b201f14f470406ae3c4a6c184ef18efd05798e0f","ref":"refs/heads/main","pushedAt":"2024-04-03T18:02:08.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"refactor gameplay logic to correctly follow truco rules, clear table after each trick","shortMessageHtmlLink":"refactor gameplay logic to correctly follow truco rules, clear table …"}},{"before":"48fdfb53b8bc12af23592731d911ba036ab3b229","after":"9c390079380921071f1f1adad15f1c081e99e7a3","ref":"refs/heads/main","pushedAt":"2024-04-03T17:56:14.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"refactor gameplay logic to correctly implement truco rules, add lead_player attribute, update current_player based on trick winner","shortMessageHtmlLink":"refactor gameplay logic to correctly implement truco rules, add lead_…"}},{"before":"fa2693f8daa62649c436bf9702eb546735ad01cd","after":"48fdfb53b8bc12af23592731d911ba036ab3b229","ref":"refs/heads/main","pushedAt":"2024-04-03T17:52:04.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"fix human player card selection, harmonize and optimize code","shortMessageHtmlLink":"fix human player card selection, harmonize and optimize code"}},{"before":"7f80cf09c23d47107b3f9a2eca528cef9287142e","after":"fa2693f8daa62649c436bf9702eb546735ad01cd","ref":"refs/heads/main","pushedAt":"2024-04-03T17:46:19.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"fix test_game function to handle tie case correctly","shortMessageHtmlLink":"fix test_game function to handle tie case correctly"}},{"before":"2f2d944e6a2334dacd6049843796002d3a2d07a2","after":"7f80cf09c23d47107b3f9a2eca528cef9287142e","ref":"refs/heads/main","pushedAt":"2024-04-03T17:43:50.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"fix test_game function to handle tie case correctly","shortMessageHtmlLink":"fix test_game function to handle tie case correctly"}},{"before":"794140bd17143b98986b5f02c94171432884b7a8","after":"2f2d944e6a2334dacd6049843796002d3a2d07a2","ref":"refs/heads/main","pushedAt":"2024-04-03T17:42:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"fix tie game handling, update test_game to handle all cases","shortMessageHtmlLink":"fix tie game handling, update test_game to handle all cases"}},{"before":"ead997d1739bb598984086ec65558561cc9335e6","after":"794140bd17143b98986b5f02c94171432884b7a8","ref":"refs/heads/main","pushedAt":"2024-04-03T17:36:56.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"Optimize and harmonize code\n\n- Refactor the method to use list indexing and assignment for better performance.\n- Use the \u001B[3J\u001B[H\u001B[2J method instead of reassigning an empty list to the attribute.\n- Remove unnecessary parentheses and simplify conditional expressions.\n- Use a generator expression to create the deck of cards.\n- Improve readability by using f-strings for string formatting.\n- Use the method to concatenate card strings instead of a list comprehension.\n- Handle tie games correctly by setting the attribute to when both players run out of cards.\n- Update the function to handle the case of a tie game.","shortMessageHtmlLink":"Optimize and harmonize code"}},{"before":"c87d0d285433ad3000dd0c84ff4b22cc2af5528a","after":"ead997d1739bb598984086ec65558561cc9335e6","ref":"refs/heads/main","pushedAt":"2024-04-03T17:10:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"update test_game to modify assertion after judger.play(state) call to handle case when winner is None, indicating a tie, if winner is None, we assert that score of both player are equal","shortMessageHtmlLink":"update test_game to modify assertion after judger.play(state) call to…"}},{"before":"f9dbc15f6e58275874e00a9f817a5f2c2e812462","after":"c87d0d285433ad3000dd0c84ff4b22cc2af5528a","ref":"refs/heads/main","pushedAt":"2024-04-03T17:01:02.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"modify play method in Judger to check if player has valid moves before attempting to make a move, if player doesnt have valid moves then eng game and determine winner based on current scores","shortMessageHtmlLink":"modify play method in Judger to check if player has valid moves befor…"}},{"before":"48ce27853eb79d4023c67f738ff80735b8e643b1","after":"f9dbc15f6e58275874e00a9f817a5f2c2e812462","ref":"refs/heads/main","pushedAt":"2024-04-03T16:57:13.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"modify reset_game method in Judger class to ensure that there are enough cards in deck for all players to receive a complete hand","shortMessageHtmlLink":"modify reset_game method in Judger class to ensure that there are eno…"}},{"before":"f61a91eea5efd4cc183006974248a13af23baef5","after":"48ce27853eb79d4023c67f738ff80735b8e643b1","ref":"refs/heads/main","pushedAt":"2024-04-03T16:53:14.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"drukpa1455","name":"drk","path":"/drukpa1455","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/136856552?s=80&v=4"},"commit":{"message":"add docstrings, fix bugs in test_game, play, act, choice","shortMessageHtmlLink":"add docstrings, fix bugs in test_game, play, act, choice"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEKUXNIQA","startCursor":null,"endCursor":null}},"title":"Activity · drukpa1455/truco"}