Movatterモバイル変換


[0]ホーム

URL:


Sorry, we no longer support your browser
Please upgrade toMicrosoft Edge,Google Chrome, orFirefox. Learn more about ourbrowser support.
Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities includingStack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Loading…
Code Golf

You are notlogged in. Your edit will be placed in a queue until it ispeer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

*

More generally…

  • …Please make sure to answer the question and provide sufficient detail.

  • …Avoid asking for help, clarification or responding to other answers (use comments instead).

Draft saved
Draft discarded
Cancel
5
  • \$\begingroup\$Is the color used only for see who win?\$\endgroup\$CommentedFeb 8 at 19:44
  • \$\begingroup\$"Otherwise, it's a tie, no one wins this round" that means the 2 card gamed are discarded?\$\endgroup\$CommentedFeb 8 at 19:53
  • \$\begingroup\$Are we supposed to internally maintain a hand of 5 cards for the computer as well, or can we just draw a random card each time it plays? (I assumed the former, although I believe that's a non-observable requirement). Also, may the same card be drawn several times during the same game or is it definitely removed from the deck?\$\endgroup\$CommentedFeb 8 at 22:32
  • 1
    \$\begingroup\$@Rosario The color is only used when checking if someone won the entire game or not, this is its only purpose. After a round, no matter what, Player 1 looses the card they played from their hand and gains a new random card that isn't already in their hand (In the original game, same thing for Player 2, but I decided than managing Player 2's hand was maybe a bit too hard). In case of a tie, the only thing that changes is that no one gets a card added to their winning pile. So yeah, they are basically discarded, though they can still be generated randomly for the next round.\$\endgroup\$CommentedFeb 9 at 0:34
  • 1
    \$\begingroup\$@Arnauld It was actually the latter (no extra requirement, just a random card, this was done in order to simplify the rules and also because it would be non-verifiable otherwise). The same card can be drawn several times, the only requirement is for Player 1 to not have any duplicate in their hand.\$\endgroup\$CommentedFeb 9 at 0:39
Add a comment | 
How to Edit
  • Correct minor typos or mistakes
  • Clarify meaning without changing it
  • Add related resources or links
  • Always respect the author’s intent
  • Don’t use edits to reply to the author
How to Format
  • create code fences with backticks ` or tildes ~
    ```
    like so
    ```
  • add language identifier to highlight code
    ```python
    def function(foo):
        print(foo)
    ```
  • put returns between paragraphs
  • for linebreak add 2 spaces at end
  • _italic_ or**bold**
  • indent code by 4 spaces
  • backtick escapes`like _so_`
  • quote by placing > at start of line
  • to make links (use https whenever possible)
    <https://example.com>
    [example](https://example.com)
    <a href="https://example.com">example</a>
  • MathJax equations\$\sin^2 \theta\$

MathJax help »

How to Tag

A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.

  • complete the sentence:my question is about...
  • use tags that describe things or concepts that areessential, not incidental to your question
  • favor usingexisting popular tags
  • read the descriptions that appear below the tag

If your question is primarily about a topic for which you can't find a tag:

popular tags »



[8]ページ先頭

©2009-2025 Movatter.jp