Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
5add56d8
Commit
5add56d8
authored
Feb 11, 2015
by
Jeffrey Oliver
Browse files
Fixed up whitespace.
parent
cc32e8c8
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/player.cpp
View file @
5add56d8
This diff is collapsed.
Click to expand it.
cockatrice/src/player.h
View file @
5add56d8
...
@@ -67,11 +67,11 @@ private slots:
...
@@ -67,11 +67,11 @@ private slots:
public:
public:
enum
{
Type
=
typeOther
};
enum
{
Type
=
typeOther
};
int
type
()
const
{
return
Type
;
}
int
type
()
const
{
return
Type
;
}
PlayerArea
(
QGraphicsItem
*
parent
=
0
);
PlayerArea
(
QGraphicsItem
*
parent
=
0
);
QRectF
boundingRect
()
const
{
return
bRect
;
}
QRectF
boundingRect
()
const
{
return
bRect
;
}
void
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
);
void
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
);
void
setSize
(
qreal
width
,
qreal
height
);
void
setSize
(
qreal
width
,
qreal
height
);
};
};
...
@@ -104,7 +104,7 @@ signals:
...
@@ -104,7 +104,7 @@ signals:
void
logStopDumpZone
(
Player
*
player
,
CardZone
*
zone
);
void
logStopDumpZone
(
Player
*
player
,
CardZone
*
zone
);
void
logRevealCards
(
Player
*
player
,
CardZone
*
zone
,
int
cardId
,
QString
cardName
,
Player
*
otherPlayer
,
bool
faceDown
);
void
logRevealCards
(
Player
*
player
,
CardZone
*
zone
,
int
cardId
,
QString
cardName
,
Player
*
otherPlayer
,
bool
faceDown
);
void
logAlwaysRevealTopCard
(
Player
*
player
,
CardZone
*
zone
,
bool
reveal
);
void
logAlwaysRevealTopCard
(
Player
*
player
,
CardZone
*
zone
,
bool
reveal
);
void
sizeChanged
();
void
sizeChanged
();
void
gameConceded
();
void
gameConceded
();
public
slots
:
public
slots
:
...
@@ -128,16 +128,16 @@ public slots:
...
@@ -128,16 +128,16 @@ public slots:
void
actViewGraveyard
();
void
actViewGraveyard
();
void
actViewRfg
();
void
actViewRfg
();
void
actViewSideboard
();
void
actViewSideboard
();
void
actSayMessage
();
void
actSayMessage
();
private
slots
:
private
slots
:
void
addPlayer
(
Player
*
player
);
void
addPlayer
(
Player
*
player
);
void
removePlayer
(
Player
*
player
);
void
removePlayer
(
Player
*
player
);
void
playerListActionTriggered
();
void
playerListActionTriggered
();
void
updateBoundingRect
();
void
updateBoundingRect
();
void
rearrangeZones
();
void
rearrangeZones
();
void
actOpenDeckInDeckEditor
();
void
actOpenDeckInDeckEditor
();
void
actCreatePredefinedToken
();
void
actCreatePredefinedToken
();
void
cardMenuAction
();
void
cardMenuAction
();
...
@@ -172,7 +172,7 @@ private:
...
@@ -172,7 +172,7 @@ private:
*
aDrawCard
,
*
aDrawCards
,
*
aUndoDraw
,
*
aMulligan
,
*
aShuffle
,
*
aDrawCard
,
*
aDrawCards
,
*
aUndoDraw
,
*
aMulligan
,
*
aShuffle
,
*
aUntapAll
,
*
aRollDie
,
*
aCreateToken
,
*
aCreateAnotherToken
,
*
aUntapAll
,
*
aRollDie
,
*
aCreateToken
,
*
aCreateAnotherToken
,
*
aCardMenu
,
*
aMoveBottomCardToGrave
;
*
aCardMenu
,
*
aMoveBottomCardToGrave
;
QList
<
QAction
*>
aAddCounter
,
aSetCounter
,
aRemoveCounter
;
QList
<
QAction
*>
aAddCounter
,
aSetCounter
,
aRemoveCounter
;
QAction
*
aPlay
,
*
aPlayFacedown
,
QAction
*
aPlay
,
*
aPlayFacedown
,
*
aHide
,
*
aHide
,
...
@@ -190,21 +190,21 @@ private:
...
@@ -190,21 +190,21 @@ private:
bool
mirrored
;
bool
mirrored
;
bool
handVisible
;
bool
handVisible
;
bool
conceded
;
bool
conceded
;
bool
dialogSemaphore
;
bool
dialogSemaphore
;
bool
clearCardsToDelete
();
bool
clearCardsToDelete
();
QList
<
CardItem
*>
cardsToDelete
;
QList
<
CardItem
*>
cardsToDelete
;
DeckLoader
*
deck
;
DeckLoader
*
deck
;
QStringList
predefinedTokens
;
QStringList
predefinedTokens
;
PlayerArea
*
playerArea
;
PlayerArea
*
playerArea
;
QMap
<
QString
,
CardZone
*>
zones
;
QMap
<
QString
,
CardZone
*>
zones
;
StackZone
*
stack
;
StackZone
*
stack
;
TableZone
*
table
;
TableZone
*
table
;
HandZone
*
hand
;
HandZone
*
hand
;
PlayerTarget
*
playerTarget
;
PlayerTarget
*
playerTarget
;
void
setCardAttrHelper
(
const
GameEventContext
&
context
,
CardItem
*
card
,
CardAttribute
attribute
,
const
QString
&
avalue
,
bool
allCards
);
void
setCardAttrHelper
(
const
GameEventContext
&
context
,
CardItem
*
card
,
CardAttribute
attribute
,
const
QString
&
avalue
,
bool
allCards
);
QRectF
bRect
;
QRectF
bRect
;
...
@@ -212,9 +212,9 @@ private:
...
@@ -212,9 +212,9 @@ private:
QMap
<
int
,
AbstractCounter
*>
counters
;
QMap
<
int
,
AbstractCounter
*>
counters
;
QMap
<
int
,
ArrowItem
*>
arrows
;
QMap
<
int
,
ArrowItem
*>
arrows
;
void
rearrangeCounters
();
void
rearrangeCounters
();
void
initSayMenu
();
void
initSayMenu
();
void
eventConnectionStateChanged
(
const
Event_ConnectionStateChanged
&
event
);
void
eventConnectionStateChanged
(
const
Event_ConnectionStateChanged
&
event
);
void
eventGameSay
(
const
Event_GameSay
&
event
);
void
eventGameSay
(
const
Event_GameSay
&
event
);
void
eventShuffle
(
const
Event_Shuffle
&
event
);
void
eventShuffle
(
const
Event_Shuffle
&
event
);
...
@@ -239,12 +239,12 @@ private:
...
@@ -239,12 +239,12 @@ private:
public:
public:
static
const
int
counterAreaWidth
=
55
;
static
const
int
counterAreaWidth
=
55
;
enum
CardMenuActionType
{
cmTap
,
cmUntap
,
cmDoesntUntap
,
cmFlip
,
cmPeek
,
cmClone
,
cmMoveToTopLibrary
,
cmMoveToBottomLibrary
,
cmMoveToGraveyard
,
cmMoveToExile
};
enum
CardMenuActionType
{
cmTap
,
cmUntap
,
cmDoesntUntap
,
cmFlip
,
cmPeek
,
cmClone
,
cmMoveToTopLibrary
,
cmMoveToBottomLibrary
,
cmMoveToGraveyard
,
cmMoveToExile
};
enum
{
Type
=
typeOther
};
enum
{
Type
=
typeOther
};
int
type
()
const
{
return
Type
;
}
int
type
()
const
{
return
Type
;
}
QRectF
boundingRect
()
const
;
QRectF
boundingRect
()
const
;
void
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
);
void
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
);
void
playCard
(
CardItem
*
c
,
bool
faceDown
,
bool
tapped
);
void
playCard
(
CardItem
*
c
,
bool
faceDown
,
bool
tapped
);
void
addCard
(
CardItem
*
c
);
void
addCard
(
CardItem
*
c
);
void
deleteCard
(
CardItem
*
c
);
void
deleteCard
(
CardItem
*
c
);
...
@@ -254,7 +254,7 @@ public:
...
@@ -254,7 +254,7 @@ public:
AbstractCounter
*
addCounter
(
int
counterId
,
const
QString
&
name
,
QColor
color
,
int
radius
,
int
value
);
AbstractCounter
*
addCounter
(
int
counterId
,
const
QString
&
name
,
QColor
color
,
int
radius
,
int
value
);
void
delCounter
(
int
counterId
);
void
delCounter
(
int
counterId
);
void
clearCounters
();
void
clearCounters
();
ArrowItem
*
addArrow
(
const
ServerInfo_Arrow
&
arrow
);
ArrowItem
*
addArrow
(
const
ServerInfo_Arrow
&
arrow
);
ArrowItem
*
addArrow
(
int
arrowId
,
CardItem
*
startCard
,
ArrowTarget
*
targetItem
,
const
QColor
&
color
);
ArrowItem
*
addArrow
(
int
arrowId
,
CardItem
*
startCard
,
ArrowTarget
*
targetItem
,
const
QColor
&
color
);
void
delArrow
(
int
arrowId
);
void
delArrow
(
int
arrowId
);
...
@@ -284,19 +284,19 @@ public:
...
@@ -284,19 +284,19 @@ public:
void
setShortcutsActive
();
void
setShortcutsActive
();
void
setShortcutsInactive
();
void
setShortcutsInactive
();
void
updateZones
();
void
updateZones
();
void
setConceded
(
bool
_conceded
);
void
setConceded
(
bool
_conceded
);
bool
getConceded
()
const
{
return
conceded
;
}
bool
getConceded
()
const
{
return
conceded
;
}
void
setGameStarted
();
void
setGameStarted
();
qreal
getMinimumWidth
()
const
;
qreal
getMinimumWidth
()
const
;
void
setMirrored
(
bool
_mirrored
);
void
setMirrored
(
bool
_mirrored
);
void
processSceneSizeChange
(
int
newPlayerWidth
);
void
processSceneSizeChange
(
int
newPlayerWidth
);
void
processPlayerInfo
(
const
ServerInfo_Player
&
info
);
void
processPlayerInfo
(
const
ServerInfo_Player
&
info
);
void
processCardAttachment
(
const
ServerInfo_Player
&
info
);
void
processCardAttachment
(
const
ServerInfo_Player
&
info
);
void
processGameEvent
(
GameEvent
::
GameEventType
type
,
const
GameEvent
&
event
,
const
GameEventContext
&
context
);
void
processGameEvent
(
GameEvent
::
GameEventType
type
,
const
GameEvent
&
event
,
const
GameEventContext
&
context
);
PendingCommand
*
prepareGameCommand
(
const
::
google
::
protobuf
::
Message
&
cmd
);
PendingCommand
*
prepareGameCommand
(
const
::
google
::
protobuf
::
Message
&
cmd
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment