Quote from: TruDev on December 07, 2018, 03:56:28 AM
Shoutouts to @Scipi for having the protagonist as his avatar
Can confirm, OneShot is a great game :3
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Quote from: TruDev on December 07, 2018, 03:56:28 AM
Shoutouts to @Scipi for having the protagonist as his avatar
Quote from: PT_ on February 01, 2017, 08:03:02 PM
My intention was that I have no problems with clickbaits (well, not 100% true), but the staff shouldn't make such topics, they are an example for the others
But this is just my opinion, don't mind me if you disagree.
Quote from: kotu on November 14, 2016, 05:31:40 PM
Re. potentially non-technical devs, is this what you mean? --->Code Select
//---------------------------------------------------------------------------
void TTachGame::ProcessLeftClick(int PlayerID, int SqrX, int SqrY)
{
bool movedOrAttacked = false;
bool didNinjaMove = false;
int enemyID;
if (PlayerID == 0) enemyID = 1;
else enemyID = 0;
if (GetSelectedUnit()) // assume we are trying to move a piece
{
for (DWORD i = 0; i < GetSelectedUnit()->GetNumAvailableMoves(); i++)
{
TTachMove move = GetSelectedUnit()->GetMove(i);
if ((move.ToPosX == SqrX) && (move.ToPosY == SqrY))
{
if (move.MoveType == TMT_STANDARD)
{
// this could be a move or an attack!!
if (move.Attack || FormMain->Cursor == crCross)
{
// we are attacking another piece!! YES!!!
bool queenTeleportAttack = false;
if ((GetSelectedUnit()->GetType() == TUT_QUEEN) && (FormMain->Cursor != crCross))
{
int dx = SqrX - GetSelectedUnit()->GetPosX();
int dy = SqrY - GetSelectedUnit()->GetPosY();
if ((dx <= 1) && (dy <= 1)) {
queenTeleportAttack = false;
}
else {
queenTeleportAttack = true;
}
}
TTachUnit* enemyUnit = m_Players[enemyID].GetUnit(SqrX, SqrY); //
// check for queen wish attack
if (FormMain->Cursor == crCross)
{
if (enemyUnit) enemyUnit->GetQueenWishAttacked(*GetSelectedUnit(), 2.5f);
TTachUnit* u = m_Players[enemyID].GetUnit(SqrX-1, SqrY);
if (u) u->GetQueenWishAttacked(*GetSelectedUnit(), 2.0f);
u = m_Players[enemyID].GetUnit(SqrX+1, SqrY);
if (u) u->GetQueenWishAttacked(*GetSelectedUnit(), 2.0f);
u = m_Players[enemyID].GetUnit(SqrX, SqrY-1);
if (u) u->GetQueenWishAttacked(*GetSelectedUnit(), 2.0f);
u = m_Players[enemyID].GetUnit(SqrX, SqrY+1);
if (u) u->GetQueenWishAttacked(*GetSelectedUnit(), 2.0f);
u = m_Players[enemyID].GetUnit(SqrX-1, SqrY-1);
if (u) u->GetQueenWishAttacked(*GetSelectedUnit(), 1.0f);
u = m_Players[enemyID].GetUnit(SqrX-1, SqrY+1);
if (u) u->GetQueenWishAttacked(*GetSelectedUnit(), 1.0f);
u = m_Players[enemyID].GetUnit(SqrX+1, SqrY-1);
if (u) u->GetQueenWishAttacked(*GetSelectedUnit(), 1.0f);
u = m_Players[enemyID].GetUnit(SqrX+1, SqrY+1);
if (u) u->GetQueenWishAttacked(*GetSelectedUnit(), 1.0f);
FormMain->Cursor = crDefault;
m_Players[0].PurgeDeadUnits();
m_Players[1].PurgeDeadUnits();
movedOrAttacked = true;
break;
}
if (enemyUnit)
{
if ((enemyUnit->GetType() == TUT_KING) && (GetSelectedUnit()->GetType() == TUT_PAWN)) // check for single move checkmate
{ // ] END OF GAME [
FormMain->DeclareEndOfGame(false, GetCurrentPlayer()->GetName());
movedOrAttacked = true;
break;
}
else if (queenTeleportAttack) { // check for queen teleport attack
enemyUnit->GetTeleportAttacked(*GetSelectedUnit());
}
else { // check for all other TMT_STANDARD attacks
enemyUnit->GetAttacked(*GetSelectedUnit()); // this is where most of the attacks happen
}
if (m_NumNinjaMoves > 0) {
m_NumNinjaMoves--;
didNinjaMove = true;
}
m_Players[0].PurgeDeadUnits();
m_Players[1].PurgeDeadUnits();
movedOrAttacked = true;
break;
}
}
else
{
/// this is just a move.
GetSelectedUnit()->MoveToPos(SqrX, SqrY, this);
if (m_NumNinjaMoves > 0) {
m_NumNinjaMoves--;
didNinjaMove = true;
}
movedOrAttacked = true;
break;
}
}
else if (move.MoveType == TMT_BOMB)
{
// bomb the square
//...
TTachUnit* enemyUnit = m_Players[enemyID].GetUnit(SqrX, SqrY);
if (enemyUnit)
{
enemyUnit->GetBombed();
m_Players[enemyID].PurgeDeadUnits();
}
FormMain->BombNoise();
movedOrAttacked = true;
break;
}
}
}
}
if (movedOrAttacked == false) // assume we are trying to select something else
{
if (m_NumNinjaMoves == 0) {
SelectUnit(SqrX, SqrY);
}
}
//-----------------------------------------------------
// CHECK FOR THE OTHER END OF GAME STATES (THERE IS ONE ABOVE) //
// check for dead king
if (m_Players[enemyID].KingIsDead()) {
FormMain->DeclareEndOfGame(false, GetCurrentPlayer()->GetName());
}
// check for K vs K draw
if (m_Players[0].OnlyKingIsLeft() && m_Players[1].OnlyKingIsLeft()) {
FormMain->DeclareEndOfGame(true, "");
}
// check for KQ vs K win
if (m_Players[0].OnlyKingIsLeft() && m_Players[1].OnlyKingAndQueenAreLeft()) {
FormMain->DeclareEndOfGame(false, m_Players[1].GetName());
}
else if (m_Players[1].OnlyKingIsLeft() && m_Players[0].OnlyKingAndQueenAreLeft()) {
FormMain->DeclareEndOfGame(false, m_Players[0].GetName());
}
//-----------------------------------------------------
// hand control to next player
if (movedOrAttacked)
{
if (didNinjaMove && m_NumNinjaMoves > 0)
{
if (FormMain->Menu_BlackBoxEnabled->Checked) {
FormMain->SaveBlackboxData();
}
}
// SEND GAME TO OTHER PC (NETWORK) HERE
RandomlyAddPowerup();
IncrementNumMoves();
FormMain->SendMove();
//----
if (m_NumNinjaMoves == 0)
{
HandControlToNextPlayer();
//FormMain->SendNextPlayer();
}
}
}
//---------------------------------------------------------------------------
(don't)
Quote from: kotu on November 14, 2016, 05:31:40 PMQuote from: Scipi on November 14, 2016, 04:09:25 PM
I hold that C++ builder is rather pointless.
6
*edit*
trying to edit this post, can't.
Did you think that the power / speed of C++ was somehow degraded by it having a visual form designer or something
Quote from: p2 on November 10, 2016, 10:15:33 AM
it has begun...
But also:Quote from: Putin"Russia is ready and wants to restore the full fledged relations to the United States. I repeat: we understand that this will be a difficult way but we are ready to play our part in it."
Quote from: DJ Omnimaga on November 09, 2016, 04:57:54 PM
so hopefully he won't turn Canada and Europe into a dumping ground for deported Americans
QuoteSpoiler: Hillary Clinton crying
//...
frame.addKeyListener(keyControls);
//...
i = getc(f);
while(i != EOF){
//...
i = getc(f);
}
while((i = getc(f)) != EOF)
//...
while(i = getc(f)+1) a[i-1]++;
while(i=~getc(f))a[~i]++;
Quote from: c4ooo on October 21, 2016, 10:48:56 PMQuoteimport java.awt.*;Never import entire APIs
import java.awt.image.*;
import javax.imageio.*;
import java.lang.*;
import java.io.*;
import javax.swing.*;