Category

Difference between revisions of "Shuffle"

From Shadow Era Wiki

m
m
 
(9 intermediate revisions by one user not shown)
Line 12: Line 12:
 
</div>
 
</div>
 
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>
 
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>
*Based on this, with the help of an application called [https://www.sublimetext.com/ Sublime Text], which assisted me in searching for and identifying words related to the shuffle mechanism, nine files caught my attention.<br>
+
*Based on this, with the help of an application called [https://www.sublimetext.com/ Sublime Text], which assisted me in searching for and identifying words related to the shuffle mechanism, twelve files caught my attention.<br>
*However, there may be more, as the game Shadow Era contains over 6000 *.cs files
+
 
<div class="mw-collapsible mw-collapsed">
 
<div class="mw-collapsible mw-collapsed">
 +
*However, there may be more, as the game Shadow Era contains over 6000 *.cs files
 
<br>
 
<br>
 
{| class="wikitable" code-table"
 
{| class="wikitable" code-table"
Line 56: Line 56:
 
<span style="color: violet;">GameState.cs</span><br>
 
<span style="color: violet;">GameState.cs</span><br>
 
Game States Related to Drawing:<br>
 
Game States Related to Drawing:<br>
References to specific states like `mulliganDraw` and `GameStateType.draw`, which indicate when the drawing should occur in the game flow.
+
References to specific states like `mulliganDraw` and `GameStateType.draw`, which indicate when the drawing should occur in the game flow.<br>
 +
<br>
 +
<span style="color: violet;">Interleave.cs</span><br>
 +
`internal static uint Shuffle(uint x)` & `internal static uint Shuffle2(uint x)` : These functions seem to involve shuffle algorithms, which could be useful for understanding the underlying logic.<br>
 +
<br>
 +
<span style="color: violet;">SpecificCard.cs</span><br>
 +
`GameModel.ShuffleDeck(ally.ownerSide);` : Indicates a shuffle mechanism related to specific cards, which may be relevant for specific card interactions in the game.<br>
 +
<br>
 +
<span style="color: violet;">Utility.cs</span><br>
 +
`public static void ShuffleList<T>(List<T> list)`: Uses a generic shuffle mechanism, useful to see how lists are handled.
 
|}
 
|}
 
</div>
 
</div>
 
<br>
 
<br>
 
<br>
 
<br>
Shuffle Process:<br>
+
Now, with these first nine files and by searching the functions, I have a better understanding of some mechanism processes:
[[:Category_talk:Shuffle|Shuffle Code]]<br>
+
#Shuffle Process:<br>[[:Category_talk:Shuffle|Shuffle Code]]<br>
Random Process:<br>
+
#Random Process:<br>[[:Category_talk:Randomization|Randomization Code]]<br>
[[:Category_talk:Randomization|Randomization Code]]<br>
+
#Mulligan Process: <br>[[:Category_talk:Mulligan|Mulligan Code]] (appears to be an unfinished feature)<br>
Draw Process:<br>
+
#Draw Process:<br>[[:Category_talk:Draw|Draw Code]]<br>
[[:Category_talk:Draw|Draw Code]]<br>
+
<br>
 +
<br>
 +
<center><img src="https://www.shadowera.com/landing/img/blog-separator-2.png" ></center><br>

Latest revision as of 21:37, 3 October 2024

To determine if the files are directly related to the management of cards and decks in the context of a game like Shadow Era, I used the following criteria:


Descriptive File Names:
I prioritized files whose names suggest they might contain logic related to cards or decks. For example, names like CardData.cs, DeckListDisplay.cs, or DeckBuilder.cs clearly indicate a card-centric or deck-building functionality.

Context of File Names:
Some files, such as GameModel.cs, GameManager.cs, and GameController.cs, suggest overall game management that could include the manipulation of decks and cards, particularly card shuffling or drawing.

Specific Terminology:
Files containing terms like Card, Deck, Game, or actions such as Draw, Shuffle, or Random in their names or content are examined more closely, as they are likely to contain methods directly involved in card management and game mechanics.


  • Based on this, with the help of an application called Sublime Text, which assisted me in searching for and identifying words related to the shuffle mechanism, twelve files caught my attention.
  • However, there may be more, as the game Shadow Era contains over 6000 *.cs files


CardData.cs
Draw Pool:
`DeckBuilder.DrawNumberOfCard(...)`: Used to draw specific cards, indicating that the card drawing is managed through a function that could be integrated into the game logic.

DeckBuilder.cs
Drawing Methods:
`public static void DrawNumberOfCard(...)`: A public function that seems to handle the drawing of cards.
Several other references to drawing methods that might be related to the user interface or the presentation of drawn cards.

DeckListDisplay.cs
Drawing Methods:
`game.DrawHighlightedCards();`: Indicates that the highlighted cards are drawn, which is relevant for displaying cards after a draw.

Drawing.cs
This file seems to be more focused on graphical drawing and the user interface than on drawing or shuffling logic. It does not contain direct references to the mechanisms of card drawing, but the file needs a deeper observation.

GameController.cs
Game State:
`GameModel.ShuffleDeck();`: Indicates that the shuffling of cards is triggered by this method, which is important for understanding when and how the shuffling is performed.

GameManager.cs
Drawing Logic:
References to `drawOffers`, interactions related to drawing, although this seems more focused on draw offers between players.

GameModel.cs
Drawing and Shuffling Mechanisms:
`public static void Draw(int side)`: A key method that handles card drawing for a side.
`public static void ShuffleDeck(int side)`: A method to shuffle a player’s deck.
Methods related to activating game states, drawing, and displaying drawn cards, which is essential for understanding how drawing and shuffling interact.

Gameplay.cs
Drawing Management:
`public void OnDraw()`: This method might handle the process after a card is drawn.
References to the drawing queue, indicating that cards are drawn in a sequential order with potential delays.

GameState.cs
Game States Related to Drawing:
References to specific states like `mulliganDraw` and `GameStateType.draw`, which indicate when the drawing should occur in the game flow.

Interleave.cs
`internal static uint Shuffle(uint x)` & `internal static uint Shuffle2(uint x)` : These functions seem to involve shuffle algorithms, which could be useful for understanding the underlying logic.

SpecificCard.cs
`GameModel.ShuffleDeck(ally.ownerSide);` : Indicates a shuffle mechanism related to specific cards, which may be relevant for specific card interactions in the game.

Utility.cs
`public static void ShuffleList<T>(List<T> list)`: Uses a generic shuffle mechanism, useful to see how lists are handled.



Now, with these first nine files and by searching the functions, I have a better understanding of some mechanism processes:

  1. Shuffle Process:
    Shuffle Code
  2. Random Process:
    Randomization Code
  3. Mulligan Process:
    Mulligan Code (appears to be an unfinished feature)
  4. Draw Process:
    Draw Code




Pages in category "Shuffle"

The following 3 pages are in this category, out of 3 total.