Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Tetris/doc/html/class_game.html
2022-06-08 09:14:30 +02:00

254 lines
16 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Tetris: Game Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Tetris
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('class_game.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="#events">Events</a> &#124;
<a href="class_game-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">Game Class Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for Game:</div>
<div class="dyncontent">
<div class="center">
<img src="class_game.png" alt=""/>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac341f481c8499681880628897f65af1e"><td class="memItemLeft" align="right" valign="top"><a id="ac341f481c8499681880628897f65af1e" name="ac341f481c8499681880628897f65af1e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Game</b> (string userName, <a class="el" href="class_grid.html">Grid</a> grid)</td></tr>
<tr class="separator:ac341f481c8499681880628897f65af1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d57890e311b0f4a2a0ee9a4ad00ff01"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a2d57890e311b0f4a2a0ee9a4ad00ff01">HitBottom</a> ()</td></tr>
<tr class="memdesc:a2d57890e311b0f4a2a0ee9a4ad00ff01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the current tetrominoe can't go down one row <a href="class_game.html#a2d57890e311b0f4a2a0ee9a4ad00ff01">More...</a><br /></td></tr>
<tr class="separator:a2d57890e311b0f4a2a0ee9a4ad00ff01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e29149cb9e1629c50bdf36cbc692743"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a2e29149cb9e1629c50bdf36cbc692743">HitTop</a> ()</td></tr>
<tr class="memdesc:a2e29149cb9e1629c50bdf36cbc692743"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the current tetrominoe can go down one, return false. Otherwise, return true if the current tetrominoe is at the top of the grid <a href="class_game.html#a2e29149cb9e1629c50bdf36cbc692743">More...</a><br /></td></tr>
<tr class="separator:a2e29149cb9e1629c50bdf36cbc692743"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf40cf5f5f23c737b74d12782e60871e"><td class="memItemLeft" align="right" valign="top"><a id="aaf40cf5f5f23c737b74d12782e60871e" name="aaf40cf5f5f23c737b74d12782e60871e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ClearLine</b> ()</td></tr>
<tr class="memdesc:aaf40cf5f5f23c737b74d12782e60871e"><td class="mdescLeft">&#160;</td><td class="mdescRight">It checks if there is a full line, if there is, it clears it and adds to the score <br /></td></tr>
<tr class="separator:aaf40cf5f5f23c737b74d12782e60871e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acac9fc526b9f2f77923c65cec7cc780b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#acac9fc526b9f2f77923c65cec7cc780b">PrintTetrominoe</a> ()</td></tr>
<tr class="memdesc:acac9fc526b9f2f77923c65cec7cc780b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print the tetrominoe to the grid, and if the game is playing, set the current tetrominoe to the next tetrominoe and get a new next tetrominoe <a href="class_game.html#acac9fc526b9f2f77923c65cec7cc780b">More...</a><br /></td></tr>
<tr class="separator:acac9fc526b9f2f77923c65cec7cc780b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a634f7058e98063a4ccf0a6438885d915"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_tetrominoe.html">Tetrominoe</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game.html#a634f7058e98063a4ccf0a6438885d915">GetNewTetrominoe</a> ()</td></tr>
<tr class="memdesc:a634f7058e98063a4ccf0a6438885d915"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a random tetrominoe from the list of tetrominoe strings, and return a new <a class="el" href="class_tetrominoe.html">Tetrominoe</a> object with that string. <a href="class_game.html#a634f7058e98063a4ccf0a6438885d915">More...</a><br /></td></tr>
<tr class="separator:a634f7058e98063a4ccf0a6438885d915"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d5161a51cbae00ef5c02b6e7c0bb80a"><td class="memItemLeft" align="right" valign="top"><a id="a3d5161a51cbae00ef5c02b6e7c0bb80a" name="a3d5161a51cbae00ef5c02b6e7c0bb80a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>SaveGame</b> ()</td></tr>
<tr class="memdesc:a3d5161a51cbae00ef5c02b6e7c0bb80a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save the score to the scoreboard <br /></td></tr>
<tr class="separator:a3d5161a51cbae00ef5c02b6e7c0bb80a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a06fcd63cb024f279990ce48b27d70102"><td class="memItemLeft" align="right" valign="top"><a id="a06fcd63cb024f279990ce48b27d70102" name="a06fcd63cb024f279990ce48b27d70102"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnPropertyChanged</b> (string propertyName)</td></tr>
<tr class="separator:a06fcd63cb024f279990ce48b27d70102"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="properties" name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:acc5f5bf7184a7f200e5e51ce7417781c"><td class="memItemLeft" align="right" valign="top"><a id="acc5f5bf7184a7f200e5e51ce7417781c" name="acc5f5bf7184a7f200e5e51ce7417781c"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><b>UserName</b><code> [get, set]</code></td></tr>
<tr class="separator:acc5f5bf7184a7f200e5e51ce7417781c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d864b78e910a9a135190e1c885c8a99"><td class="memItemLeft" align="right" valign="top"><a id="a4d864b78e910a9a135190e1c885c8a99" name="a4d864b78e910a9a135190e1c885c8a99"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>Score</b><code> [get, set]</code></td></tr>
<tr class="separator:a4d864b78e910a9a135190e1c885c8a99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ffd390214780327d5ed74411e4fbae9"><td class="memItemLeft" align="right" valign="top"><a id="a5ffd390214780327d5ed74411e4fbae9" name="a5ffd390214780327d5ed74411e4fbae9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Playing</b><code> [get, set]</code></td></tr>
<tr class="separator:a5ffd390214780327d5ed74411e4fbae9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b694b479e9d81643a65ad2fdfe115f2"><td class="memItemLeft" align="right" valign="top"><a id="a0b694b479e9d81643a65ad2fdfe115f2" name="a0b694b479e9d81643a65ad2fdfe115f2"></a>
<a class="el" href="class_grid.html">Grid</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Grid</b><code> [get]</code></td></tr>
<tr class="separator:a0b694b479e9d81643a65ad2fdfe115f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b551fd9b1c8496b544039e58b79fa3e"><td class="memItemLeft" align="right" valign="top"><a id="a2b551fd9b1c8496b544039e58b79fa3e" name="a2b551fd9b1c8496b544039e58b79fa3e"></a>
<a class="el" href="class_tetrominoe.html">Tetrominoe</a>?&#160;</td><td class="memItemRight" valign="bottom"><b>CurrentTetrominoe</b><code> [get]</code></td></tr>
<tr class="separator:a2b551fd9b1c8496b544039e58b79fa3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28c2e15f4cc7497314fb3c377f9e176f"><td class="memItemLeft" align="right" valign="top"><a id="a28c2e15f4cc7497314fb3c377f9e176f" name="a28c2e15f4cc7497314fb3c377f9e176f"></a>
<a class="el" href="class_tetrominoe.html">Tetrominoe</a>?&#160;</td><td class="memItemRight" valign="bottom"><b>NextTetrominoe</b><code> [get]</code></td></tr>
<tr class="separator:a28c2e15f4cc7497314fb3c377f9e176f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="events" name="events"></a>
Events</h2></td></tr>
<tr class="memitem:abb8967073f280ff3b2c4f697e23da84c"><td class="memItemLeft" align="right" valign="top"><a id="abb8967073f280ff3b2c4f697e23da84c" name="abb8967073f280ff3b2c4f697e23da84c"></a>
PropertyChangedEventHandler&#160;</td><td class="memItemRight" valign="bottom"><b>PropertyChanged</b></td></tr>
<tr class="separator:abb8967073f280ff3b2c4f697e23da84c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a634f7058e98063a4ccf0a6438885d915" name="a634f7058e98063a4ccf0a6438885d915"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a634f7058e98063a4ccf0a6438885d915">&#9670;&nbsp;</a></span>GetNewTetrominoe()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_tetrominoe.html">Tetrominoe</a> Game.GetNewTetrominoe </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a random tetrominoe from the list of tetrominoe strings, and return a new <a class="el" href="class_tetrominoe.html">Tetrominoe</a> object with that string. </p>
<dl class="section return"><dt>Returns</dt><dd>A new <a class="el" href="class_tetrominoe.html">Tetrominoe</a> object. </dd></dl>
</div>
</div>
<a id="a2d57890e311b0f4a2a0ee9a4ad00ff01" name="a2d57890e311b0f4a2a0ee9a4ad00ff01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d57890e311b0f4a2a0ee9a4ad00ff01">&#9670;&nbsp;</a></span>HitBottom()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Game.HitBottom </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return true if the current tetrominoe can't go down one row </p>
<dl class="section return"><dt>Returns</dt><dd>A boolean value. </dd></dl>
</div>
</div>
<a id="a2e29149cb9e1629c50bdf36cbc692743" name="a2e29149cb9e1629c50bdf36cbc692743"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e29149cb9e1629c50bdf36cbc692743">&#9670;&nbsp;</a></span>HitTop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Game.HitTop </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>If the current tetrominoe can go down one, return false. Otherwise, return true if the current tetrominoe is at the top of the grid </p>
<dl class="section return"><dt>Returns</dt><dd>a boolean value. </dd></dl>
</div>
</div>
<a id="acac9fc526b9f2f77923c65cec7cc780b" name="acac9fc526b9f2f77923c65cec7cc780b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acac9fc526b9f2f77923c65cec7cc780b">&#9670;&nbsp;</a></span>PrintTetrominoe()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Game.PrintTetrominoe </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Print the tetrominoe to the grid, and if the game is playing, set the current tetrominoe to the next tetrominoe and get a new next tetrominoe </p>
<dl class="section return"><dt>Returns</dt><dd>The current tetrominoe is being returned. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Tetris/Models/Game.cs</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_game.html">Game</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4 </li>
</ul>
</div>
</body>
</html>