1023 lines
52 KiB
HTML
1023 lines
52 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_31) on Sat Mar 14 10:07:08 PDT 2015 -->
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>GameManager (Vilya Core 1.6 API)</title>
|
|
<meta name="date" content="2015-03-14">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="GameManager (Vilya Core 1.6 API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/GameManager.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../../com/threerings/parlor/game/server/GameManagerDelegate.html" title="class in com.threerings.parlor.game.server"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?com/threerings/parlor/game/server/GameManager.html" target="_top">Frames</a></li>
|
|
<li><a href="GameManager.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.classes.inherited.from.class.com.threerings.crowd.server.PlaceManager">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.threerings.parlor.game.server</div>
|
|
<h2 title="Class GameManager" class="title">Class GameManager</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.threerings.crowd.server.PlaceManager</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.threerings.parlor.game.server.GameManager</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd>com.threerings.crowd.chat.server.SpeakHandler.SpeakerValidator, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html" title="interface in com.threerings.parlor.data">ParlorCodes</a>, <a href="../../../../../com/threerings/parlor/game/data/GameCodes.html" title="interface in com.threerings.parlor.game.data">GameCodes</a>, <a href="../../../../../com/threerings/parlor/server/PlayManager.html" title="interface in com.threerings.parlor.server">PlayManager</a>, com.threerings.presents.data.InvocationCodes, com.threerings.presents.dobj.ChangeListener, com.threerings.presents.dobj.MessageListener</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt>Direct Known Subclasses:</dt>
|
|
<dd><a href="../../../../../com/threerings/parlor/card/server/CardGameManager.html" title="class in com.threerings.parlor.card.server">CardGameManager</a>, <a href="../../../../../com/threerings/puzzle/server/PuzzleManager.html" title="class in com.threerings.puzzle.server">PuzzleManager</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">GameManager</span>
|
|
extends com.threerings.crowd.server.PlaceManager
|
|
implements <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html" title="interface in com.threerings.parlor.data">ParlorCodes</a>, <a href="../../../../../com/threerings/parlor/game/data/GameCodes.html" title="interface in com.threerings.parlor.game.data">GameCodes</a>, <a href="../../../../../com/threerings/parlor/server/PlayManager.html" title="interface in com.threerings.parlor.server">PlayManager</a></pre>
|
|
<div class="block">The game manager handles the server side management of a game. It manipulates the game state in
|
|
accordance with the logic of the game flow and generally manages the whole game playing process.
|
|
|
|
<p> The game manager extends the place manager because games are implicitly played in a
|
|
location, the players of the game implicitly bodies in that location.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="nested.class.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="nested.classes.inherited.from.class.com.threerings.crowd.server.PlaceManager">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested classes/interfaces inherited from class com.threerings.crowd.server.PlaceManager</h3>
|
|
<code>com.threerings.crowd.server.PlaceManager.DelegateOp, com.threerings.crowd.server.PlaceManager.MessageHandler</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.com.threerings.parlor.data.ParlorCodes">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from interface com.threerings.parlor.data.<a href="../../../../../com/threerings/parlor/data/ParlorCodes.html" title="interface in com.threerings.parlor.data">ParlorCodes</a></h3>
|
|
<code><a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#ALREADY_AT_TABLE">ALREADY_AT_TABLE</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#BANNED_FROM_TABLE">BANNED_FROM_TABLE</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#GAME_ALREADY_STARTED">GAME_ALREADY_STARTED</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#INVALID_TABLE_POSITION">INVALID_TABLE_POSITION</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#INVITATION_ACCEPTED">INVITATION_ACCEPTED</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#INVITATION_COUNTERED">INVITATION_COUNTERED</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#INVITATION_REFUSED">INVITATION_REFUSED</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#INVITEE_NOT_ONLINE">INVITEE_NOT_ONLINE</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#MUST_BE_CREATOR">MUST_BE_CREATOR</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#NO_SELF_BOOT">NO_SELF_BOOT</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#NO_SUCH_TABLE">NO_SUCH_TABLE</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#NOT_AT_TABLE">NOT_AT_TABLE</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#PARLOR_GROUP">PARLOR_GROUP</a>, <a href="../../../../../com/threerings/parlor/data/ParlorCodes.html#TABLE_POSITION_OCCUPIED">TABLE_POSITION_OCCUPIED</a></code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.com.threerings.parlor.game.data.GameCodes">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from interface com.threerings.parlor.game.data.<a href="../../../../../com/threerings/parlor/game/data/GameCodes.html" title="interface in com.threerings.parlor.game.data">GameCodes</a></h3>
|
|
<code><a href="../../../../../com/threerings/parlor/game/data/GameCodes.html#GAME_CHAT_TYPE">GAME_CHAT_TYPE</a>, <a href="../../../../../com/threerings/parlor/game/data/GameCodes.html#GAME_MESSAGE_BUNDLE">GAME_MESSAGE_BUNDLE</a>, <a href="../../../../../com/threerings/parlor/game/data/GameCodes.html#PLAYER_KNOCKED_OUT">PLAYER_KNOCKED_OUT</a>, <a href="../../../../../com/threerings/parlor/game/data/GameCodes.html#WINNERS_AND_LOSERS">WINNERS_AND_LOSERS</a></code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="fields.inherited.from.class.com.threerings.presents.data.InvocationCodes">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from interface com.threerings.presents.data.InvocationCodes</h3>
|
|
<code>ACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERROR</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#GameManager--">GameManager</a></span>()</code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#addPlayer-com.threerings.util.Name-">addPlayer</a></span>(com.threerings.util.Name player)</code>
|
|
<div class="block">Adds the given player to the game at the first available player index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#addPlayerAt-com.threerings.util.Name-int-">addPlayerAt</a></span>(com.threerings.util.Name player,
|
|
int pidx)</code>
|
|
<div class="block">Adds the given player to the game at the specified player index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#allPlayersReady--">allPlayersReady</a></span>()</code>
|
|
<div class="block">Returns true if all (non-AI) players have delivered their <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#playerReady-com.threerings.crowd.data.BodyObject-"><code>playerReady(com.threerings.crowd.data.BodyObject)</code></a>
|
|
notifications, false if they have not.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#cancelGame--">cancelGame</a></span>()</code>
|
|
<div class="block">Sets the state of the game to <a href="../../../../../com/threerings/parlor/game/data/GameObject.html#CANCELLED"><code>GameObject.CANCELLED</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>com.threerings.crowd.data.BodyObject</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#checkWritePermission-com.threerings.presents.data.ClientObject-int-">checkWritePermission</a></span>(com.threerings.presents.data.ClientObject client,
|
|
int playerId)</code>
|
|
<div class="block">Make sure that the given caller is a player or an agent and can write to the data
|
|
of the given playerId.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#endGame--">endGame</a></span>()</code>
|
|
<div class="block">Called when the game is known to be over.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#endPlayerGame-int-">endPlayerGame</a></span>(int pidx)</code>
|
|
<div class="block">Ends the game for the given player.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../../com/threerings/parlor/game/data/GameConfig.html" title="class in com.threerings.parlor.game.data">GameConfig</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getGameConfig--">getGameConfig</a></span>()</code>
|
|
<div class="block">Returns the configuration object for the game being managed by this manager.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getGameId--">getGameId</a></span>()</code>
|
|
<div class="block">Returns the unique numeric identifier for our managed game.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getMatchType--">getMatchType</a></span>()</code>
|
|
<div class="block">A convenience method for getting the game type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>com.threerings.crowd.data.BodyObject</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayer-int-">getPlayer</a></span>(int playerIdx)</code>
|
|
<div class="block">Returns the user object for the player with the specified index or null if the player at
|
|
that index is not online.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayerCount--">getPlayerCount</a></span>()</code>
|
|
<div class="block">Returns the number of players in the game.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>com.threerings.util.Name</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayerDisplayName-int-">getPlayerDisplayName</a></span>(int index)</code>
|
|
<div class="block">Returns the name that should be shown in the client for the player with the specified index
|
|
or null if no player exists at that index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayerIndex-com.threerings.util.Name-">getPlayerIndex</a></span>(com.threerings.util.Name username)</code>
|
|
<div class="block">Returns the player index of the given user in the game, or <code>-1</code> if the player is
|
|
not involved in the game.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>com.threerings.util.Name</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayerName-int-">getPlayerName</a></span>(int index)</code>
|
|
<div class="block">Returns the name of the player with the specified index or null if no player exists at that
|
|
index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayerOid-int-">getPlayerOid</a></span>(int index)</code>
|
|
<div class="block">Returns the user object oid of the player with the specified index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayerPersistentId-com.threerings.crowd.data.BodyObject-">getPlayerPersistentId</a></span>(com.threerings.crowd.data.BodyObject body)</code>
|
|
<div class="block">Convenience for getting the persistent id from a body.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayerPersistentId-com.threerings.util.Name-">getPlayerPersistentId</a></span>(com.threerings.util.Name name)</code>
|
|
<div class="block">Returns the persistent user id for the supplied player name.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayerSlots--">getPlayerSlots</a></span>()</code>
|
|
<div class="block">Returns the number of players allowed in this game.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPresentPlayerIndex-int-">getPresentPlayerIndex</a></span>(int bodyOid)</code>
|
|
<div class="block">Get the player index of the specified oid, or -1 if the oid is not a player or is a player
|
|
that is not presently in the game.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getSessionId--">getSessionId</a></span>()</code>
|
|
<div class="block">Returns the unique session identifier for this game session.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#isActivePlayer-int-">isActivePlayer</a></span>(int pidx)</code>
|
|
<div class="block">Returns whether the player at the specified player index is actively playing the game</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#isAgent-com.threerings.presents.data.ClientObject-">isAgent</a></span>(com.threerings.presents.data.ClientObject client)</code>
|
|
<div class="block">Return true if the given client is a server-side agent in this place.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#isAI-int-">isAI</a></span>(int pidx)</code>
|
|
<div class="block">Returns whether the player at the specified player index is an AI.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#isPlayer-com.threerings.presents.data.ClientObject-">isPlayer</a></span>(com.threerings.presents.data.ClientObject client)</code>
|
|
<div class="block">Return true if the given client is a player in this place.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#occupantInRoom-com.threerings.crowd.data.BodyObject-">occupantInRoom</a></span>(com.threerings.crowd.data.BodyObject caller)</code>
|
|
<div class="block">Called by the client when an occupant has arrived in the game room and has loaded their
|
|
bits.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#playerIsReady-int-">playerIsReady</a></span>(int pidx)</code>
|
|
<div class="block">Returns true if the player at the specified slot is ready (or if there is meant to be no
|
|
player in that slot), false if there is meant to be a player in the specified slot and they
|
|
have not yet reported that they are ready.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#playerReady-com.threerings.crowd.data.BodyObject-">playerReady</a></span>(com.threerings.crowd.data.BodyObject caller)</code>
|
|
<div class="block">Called by the client when the player is ready for the game to start.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#removePlayer-com.threerings.util.Name-">removePlayer</a></span>(com.threerings.util.Name player)</code>
|
|
<div class="block">Removes the given player from the game.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#replacePlayer-int-com.threerings.util.Name-">replacePlayer</a></span>(int pidx,
|
|
com.threerings.util.Name player)</code>
|
|
<div class="block">Replaces the player at the specified index and calls <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#playerWasReplaced-int-com.threerings.util.Name-com.threerings.util.Name-"><code>playerWasReplaced(int, com.threerings.util.Name, com.threerings.util.Name)</code></a> to let
|
|
derived classes and delegates know what's going on.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#resetGame--">resetGame</a></span>()</code>
|
|
<div class="block">Called when the game is to be reset to its starting state in preparation for a new game
|
|
without actually ending the current game.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#setAI-int-com.threerings.parlor.game.data.GameAI-">setAI</a></span>(int pidx,
|
|
<a href="../../../../../com/threerings/parlor/game/data/GameAI.html" title="class in com.threerings.parlor.game.data">GameAI</a> ai)</code>
|
|
<div class="block">Sets the specified player as an AI with the specified configuration.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#shouldConcludeGame--">shouldConcludeGame</a></span>()</code>
|
|
<div class="block">Returns whether game conclusion antics such as rating updates should be performed when an
|
|
in-play game is ended.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#startGame--">startGame</a></span>()</code>
|
|
<div class="block">This is called when the game is ready to start (all players involved have delivered their
|
|
"am ready" notifications).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#systemMessage-java.lang.String-java.lang.String-">systemMessage</a></span>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msgbundle,
|
|
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msg)</code>
|
|
<div class="block">Sends a system message to the players in the game room.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/threerings/parlor/game/server/GameManager.html#systemMessage-java.lang.String-java.lang.String-boolean-">systemMessage</a></span>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msgbundle,
|
|
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msg,
|
|
boolean waitForStart)</code>
|
|
<div class="block">Sends a system message to the players in the game room.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.com.threerings.crowd.server.PlaceManager">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class com.threerings.crowd.server.PlaceManager</h3>
|
|
<code>addDelegate, applyToDelegates, applyToOccupants, bodyWillEnter, bodyWillLeave, checkPermissions, getConfig, getLocation, getPlaceObject, init, isValidSpeaker, messageReceived, ratifyBodyEntry, registerMessageHandler, shutdown, startup, toString, updateOccupantInfo, where</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
|
|
<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="GameManager--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>GameManager</h4>
|
|
<pre>public GameManager()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="getGameConfig--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGameConfig</h4>
|
|
<pre>public <a href="../../../../../com/threerings/parlor/game/data/GameConfig.html" title="class in com.threerings.parlor.game.data">GameConfig</a> getGameConfig()</pre>
|
|
<div class="block">Returns the configuration object for the game being managed by this manager.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getGameId--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getGameId</h4>
|
|
<pre>public int getGameId()</pre>
|
|
<div class="block">Returns the unique numeric identifier for our managed game. See <a href="../../../../../com/threerings/parlor/game/data/GameConfig.html#getGameId--"><code>GameConfig.getGameId()</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getMatchType--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMatchType</h4>
|
|
<pre>public int getMatchType()</pre>
|
|
<div class="block">A convenience method for getting the game type.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="addPlayer-com.threerings.util.Name-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addPlayer</h4>
|
|
<pre>public int addPlayer(com.threerings.util.Name player)</pre>
|
|
<div class="block">Adds the given player to the game at the first available player index. This should only be
|
|
called before the game is started, and is most likely to be used to add players to party
|
|
games.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>player</code> - the username of the player to add to this game.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the player index at which the player was added, or <code>-1</code> if the player
|
|
could not be added to the game.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addPlayerAt-com.threerings.util.Name-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addPlayerAt</h4>
|
|
<pre>public boolean addPlayerAt(com.threerings.util.Name player,
|
|
int pidx)</pre>
|
|
<div class="block">Adds the given player to the game at the specified player index. This should only be called
|
|
before the game is started, and is most likely to be used to add players to party games.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>player</code> - the username of the player to add to this game.</dd>
|
|
<dd><code>pidx</code> - the player index at which the player is to be added.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the player was added successfully, false if not.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removePlayer-com.threerings.util.Name-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removePlayer</h4>
|
|
<pre>public boolean removePlayer(com.threerings.util.Name player)</pre>
|
|
<div class="block">Removes the given player from the game. This is most likely to be used to allow players
|
|
involved in a party game to leave the game early-on if they realize they'd rather not play
|
|
for some reason.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>player</code> - the username of the player to remove from this game.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the player was successfully removed, false if not.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="replacePlayer-int-com.threerings.util.Name-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>replacePlayer</h4>
|
|
<pre>public void replacePlayer(int pidx,
|
|
com.threerings.util.Name player)</pre>
|
|
<div class="block">Replaces the player at the specified index and calls <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#playerWasReplaced-int-com.threerings.util.Name-com.threerings.util.Name-"><code>playerWasReplaced(int, com.threerings.util.Name, com.threerings.util.Name)</code></a> to let
|
|
derived classes and delegates know what's going on.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getPlayer-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayer</h4>
|
|
<pre>public com.threerings.crowd.data.BodyObject getPlayer(int playerIdx)</pre>
|
|
<div class="block">Returns the user object for the player with the specified index or null if the player at
|
|
that index is not online.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="setAI-int-com.threerings.parlor.game.data.GameAI-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setAI</h4>
|
|
<pre>public void setAI(int pidx,
|
|
<a href="../../../../../com/threerings/parlor/game/data/GameAI.html" title="class in com.threerings.parlor.game.data">GameAI</a> ai)</pre>
|
|
<div class="block">Sets the specified player as an AI with the specified configuration. It is assumed that this
|
|
will be set soon after the player names for all AIs present in the game. (It should be done
|
|
before human players start trickling into the game.)</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pidx</code> - the player index of the AI.</dd>
|
|
<dd><code>ai</code> - the AI configuration.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPlayerName-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayerName</h4>
|
|
<pre>public com.threerings.util.Name getPlayerName(int index)</pre>
|
|
<div class="block">Returns the name of the player with the specified index or null if no player exists at that
|
|
index.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getPlayerDisplayName-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayerDisplayName</h4>
|
|
<pre>public com.threerings.util.Name getPlayerDisplayName(int index)</pre>
|
|
<div class="block">Returns the name that should be shown in the client for the player with the specified index
|
|
or null if no player exists at that index. This may be different than their username as
|
|
returned by <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#getPlayerName-int-"><code>getPlayerName(int)</code></a>, which is the player's unique name in the server.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getPlayerIndex-com.threerings.util.Name-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayerIndex</h4>
|
|
<pre>public int getPlayerIndex(com.threerings.util.Name username)</pre>
|
|
<div class="block">Returns the player index of the given user in the game, or <code>-1</code> if the player is
|
|
not involved in the game.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getPresentPlayerIndex-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPresentPlayerIndex</h4>
|
|
<pre>public int getPresentPlayerIndex(int bodyOid)</pre>
|
|
<div class="block">Get the player index of the specified oid, or -1 if the oid is not a player or is a player
|
|
that is not presently in the game.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getPlayerOid-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayerOid</h4>
|
|
<pre>public int getPlayerOid(int index)</pre>
|
|
<div class="block">Returns the user object oid of the player with the specified index.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getPlayerPersistentId-com.threerings.util.Name-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayerPersistentId</h4>
|
|
<pre>public int getPlayerPersistentId(com.threerings.util.Name name)</pre>
|
|
<div class="block">Returns the persistent user id for the supplied player name.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getPlayerPersistentId-com.threerings.crowd.data.BodyObject-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayerPersistentId</h4>
|
|
<pre>public int getPlayerPersistentId(com.threerings.crowd.data.BodyObject body)</pre>
|
|
<div class="block">Convenience for getting the persistent id from a body.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getPlayerCount--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayerCount</h4>
|
|
<pre>public int getPlayerCount()</pre>
|
|
<div class="block">Returns the number of players in the game.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getPlayerSlots--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayerSlots</h4>
|
|
<pre>public int getPlayerSlots()</pre>
|
|
<div class="block">Returns the number of players allowed in this game.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="isAI-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isAI</h4>
|
|
<pre>public boolean isAI(int pidx)</pre>
|
|
<div class="block">Returns whether the player at the specified player index is an AI.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="isActivePlayer-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isActivePlayer</h4>
|
|
<pre>public boolean isActivePlayer(int pidx)</pre>
|
|
<div class="block">Returns whether the player at the specified player index is actively playing the game</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getSessionId--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSessionId</h4>
|
|
<pre>public int getSessionId()</pre>
|
|
<div class="block">Returns the unique session identifier for this game session.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="systemMessage-java.lang.String-java.lang.String-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>systemMessage</h4>
|
|
<pre>public void systemMessage(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msgbundle,
|
|
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msg)</pre>
|
|
<div class="block">Sends a system message to the players in the game room.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="systemMessage-java.lang.String-java.lang.String-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>systemMessage</h4>
|
|
<pre>public void systemMessage(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msgbundle,
|
|
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msg,
|
|
boolean waitForStart)</pre>
|
|
<div class="block">Sends a system message to the players in the game room.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>waitForStart</code> - if true, the message will not be sent until the game has started.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="startGame--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>startGame</h4>
|
|
<pre>public boolean startGame()</pre>
|
|
<div class="block">This is called when the game is ready to start (all players involved have delivered their
|
|
"am ready" notifications). It calls <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#gameWillStart--"><code>gameWillStart()</code></a>, sets the necessary wheels in
|
|
motion and then calls <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#gameDidStart--"><code>gameDidStart()</code></a>. Derived classes should override one or both of
|
|
the calldown functions (rather than this function) if they need to do things before or after
|
|
the game starts.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the game was started, false if it could not be started because it was
|
|
already in play or because all players have not yet reported in.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="endPlayerGame-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>endPlayerGame</h4>
|
|
<pre>public void endPlayerGame(int pidx)</pre>
|
|
<div class="block">Ends the game for the given player.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="endGame--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>endGame</h4>
|
|
<pre>public void endGame()</pre>
|
|
<div class="block">Called when the game is known to be over. This will call some calldown functions to
|
|
determine the winner of the game and then transition the game to the <a href="../../../../../com/threerings/parlor/game/data/GameObject.html#GAME_OVER"><code>GameObject.GAME_OVER</code></a> state.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="cancelGame--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>cancelGame</h4>
|
|
<pre>public boolean cancelGame()</pre>
|
|
<div class="block">Sets the state of the game to <a href="../../../../../com/threerings/parlor/game/data/GameObject.html#CANCELLED"><code>GameObject.CANCELLED</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the game was cancelled, false if it was already over or cancelled.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="shouldConcludeGame--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>shouldConcludeGame</h4>
|
|
<pre>public boolean shouldConcludeGame()</pre>
|
|
<div class="block">Returns whether game conclusion antics such as rating updates should be performed when an
|
|
in-play game is ended. Derived classes may wish to override this method to customize the
|
|
conditions under which the game is concluded.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="resetGame--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>resetGame</h4>
|
|
<pre>public void resetGame()</pre>
|
|
<div class="block">Called when the game is to be reset to its starting state in preparation for a new game
|
|
without actually ending the current game. It calls <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#gameWillReset--"><code>gameWillReset()</code></a> followed by the
|
|
standard game start processing (<a href="../../../../../com/threerings/parlor/game/server/GameManager.html#gameWillStart--"><code>gameWillStart()</code></a> and <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#gameDidStart--"><code>gameDidStart()</code></a>). Derived
|
|
classes should override these calldown functions (rather than this function) if they need to
|
|
do things before or after the game resets.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="occupantInRoom-com.threerings.crowd.data.BodyObject-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>occupantInRoom</h4>
|
|
<pre>public void occupantInRoom(com.threerings.crowd.data.BodyObject caller)</pre>
|
|
<div class="block">Called by the client when an occupant has arrived in the game room and has loaded their
|
|
bits. Most games will simply call <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#playerReady-com.threerings.crowd.data.BodyObject-"><code>playerReady(com.threerings.crowd.data.BodyObject)</code></a> but games that wish to delay their
|
|
actual start until players take some action must report ASAP with a call to <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#occupantInRoom-com.threerings.crowd.data.BodyObject-"><code>occupantInRoom(com.threerings.crowd.data.BodyObject)</code></a> to let the server know that they have arrived and will later be calling
|
|
<a href="../../../../../com/threerings/parlor/game/server/GameManager.html#playerReady-com.threerings.crowd.data.BodyObject-"><code>playerReady(com.threerings.crowd.data.BodyObject)</code></a> when they are ready for the game to actually start.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="playerReady-com.threerings.crowd.data.BodyObject-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>playerReady</h4>
|
|
<pre>public void playerReady(com.threerings.crowd.data.BodyObject caller)</pre>
|
|
<div class="block">Called by the client when the player is ready for the game to start. This method is
|
|
dispatched dynamically by <code>PlaceManager.messageReceived(com.threerings.presents.dobj.MessageEvent)</code>.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="allPlayersReady--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>allPlayersReady</h4>
|
|
<pre>public boolean allPlayersReady()</pre>
|
|
<div class="block">Returns true if all (non-AI) players have delivered their <a href="../../../../../com/threerings/parlor/game/server/GameManager.html#playerReady-com.threerings.crowd.data.BodyObject-"><code>playerReady(com.threerings.crowd.data.BodyObject)</code></a>
|
|
notifications, false if they have not.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="playerIsReady-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>playerIsReady</h4>
|
|
<pre>public boolean playerIsReady(int pidx)</pre>
|
|
<div class="block">Returns true if the player at the specified slot is ready (or if there is meant to be no
|
|
player in that slot), false if there is meant to be a player in the specified slot and they
|
|
have not yet reported that they are ready.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="isPlayer-com.threerings.presents.data.ClientObject-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isPlayer</h4>
|
|
<pre>public boolean isPlayer(com.threerings.presents.data.ClientObject client)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../com/threerings/parlor/server/PlayManager.html#isPlayer-com.threerings.presents.data.ClientObject-">PlayManager</a></code></span></div>
|
|
<div class="block">Return true if the given client is a player in this place.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../../com/threerings/parlor/server/PlayManager.html#isPlayer-com.threerings.presents.data.ClientObject-">isPlayer</a></code> in interface <code><a href="../../../../../com/threerings/parlor/server/PlayManager.html" title="interface in com.threerings.parlor.server">PlayManager</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isAgent-com.threerings.presents.data.ClientObject-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isAgent</h4>
|
|
<pre>public boolean isAgent(com.threerings.presents.data.ClientObject client)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../com/threerings/parlor/server/PlayManager.html#isAgent-com.threerings.presents.data.ClientObject-">PlayManager</a></code></span></div>
|
|
<div class="block">Return true if the given client is a server-side agent in this place.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../../com/threerings/parlor/server/PlayManager.html#isAgent-com.threerings.presents.data.ClientObject-">isAgent</a></code> in interface <code><a href="../../../../../com/threerings/parlor/server/PlayManager.html" title="interface in com.threerings.parlor.server">PlayManager</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="checkWritePermission-com.threerings.presents.data.ClientObject-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>checkWritePermission</h4>
|
|
<pre>public com.threerings.crowd.data.BodyObject checkWritePermission(com.threerings.presents.data.ClientObject client,
|
|
int playerId)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../com/threerings/parlor/server/PlayManager.html#checkWritePermission-com.threerings.presents.data.ClientObject-int-">PlayManager</a></code></span></div>
|
|
<div class="block">Make sure that the given caller is a player or an agent and can write to the data
|
|
of the given playerId.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../../com/threerings/parlor/server/PlayManager.html#checkWritePermission-com.threerings.presents.data.ClientObject-int-">checkWritePermission</a></code> in interface <code><a href="../../../../../com/threerings/parlor/server/PlayManager.html" title="interface in com.threerings.parlor.server">PlayManager</a></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the resolved player object to write to</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/GameManager.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../../com/threerings/parlor/game/server/GameManagerDelegate.html" title="class in com.threerings.parlor.game.server"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?com/threerings/parlor/game/server/GameManager.html" target="_top">Frames</a></li>
|
|
<li><a href="GameManager.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested.classes.inherited.from.class.com.threerings.crowd.server.PlaceManager">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>Copyright © 2015. All rights reserved.</small></p>
|
|
</body>
|
|
</html>
|