Skip to content

Commit

Permalink
resolving merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
cardo14 committed Oct 14, 2024
1 parent 12754ef commit 5c6543b
Showing 1 changed file with 0 additions and 239 deletions.
239 changes: 0 additions & 239 deletions app/services/taggerButtonData.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ let player1GameScore = 0
let player2GameScore = 0
let isAce = false

<<<<<<< HEAD
console.log(returnerScore, player1GameScore, player2GameScore)

// function updateScore(shotInRally, isWinner, serverName) {
Expand Down Expand Up @@ -107,104 +106,11 @@ console.log(returnerScore, player1GameScore, player2GameScore)
// returnerScore += 15
// } else {
// returnerScore += 10
=======
console.log(returnerScore, player1SetScore, player2SetScore, player1GameScore, player2GameScore)

// function updateScore(shotInRally, isWinner, serverName) {
// if ((shotInRally % 2 == 0) &
// isWinner == '1') {
// if (returnerScore == 40) {
// if (serverName == 'Player1') {
// player2GameScore += 1;
// serverScore = 0;
// returnerScore = 0;
// }
// else
// {
// player1GameScore += 1;
// serverScore = 0;
// returnerScore = 0;
// }

// }
// else if (returnerScore != 30) {
// returnerScore += 15;
// }
// else {
// returnerScore += 10;
// }
// }
// else if (shotInRally % 2 == 0) {
// if (serverScore == 40) {
// if (serverName == 'Player1') {
// serverScore = 0;
// returnerScore = 0;
// player1GameScore += 1;
// }
// else
// {
// player2GameScore += 1;
// serverScore = 0;
// returnerScore = 0;
// }
// }
// else if (serverScore != 30) {
// serverScore += 15;
// }
// else {
// serverScore += 10;
// }

// }
// else if (shotInRally % 2 == 1 &
// isWinner == '1') {
// if (serverScore == 40) {
// if (serverName == 'Player1') {
// player1GameScore += 1;
// serverScore = 0;
// returnerScore = 0;
// }
// else
// {
// player2GameScore += 1;
// serverScore = 0;
// returnerScore = 0;
// }
// }
// else if (serverScore != 30) {
// serverScore += 15;
// }
// else {
// serverScore += 10;
// }
// }
// else {
// if (returnerScore == 40) {
// if (serverName == 'Player1') {
// serverScore = 0;
// returnerScore = 0;
// player2GameScore += 1;
// }
// else
// {
// player1GameScore += 1;
// serverScore = 0;
// returnerScore = 0;
// }

// }
// else if (returnerScore != 30) {
// returnerScore += 15;
// }
// else {
// returnerScore += 10;
>>>>>>> main
// }
// }
// }
// function chooseSide({ tiebreak = false } = {}) {
// if (tiebreak) {
<<<<<<< HEAD
// if ((serverScore + returnerScore) % 2 === 0) {
// return 'Deuce'
// } else {
Expand Down Expand Up @@ -240,60 +146,10 @@ console.log(returnerScore, player1SetScore, player2SetScore, player1GameScore, p
// serverScore = 0
// returnerScore = 0
// }
=======
// if ((serverScore + returnerScore) % 2 == 0) {
// return "Deuce";
// }
// else
// {
// return "Ad";
// }
// }
// if (serverScore == 40 || returnerScore == 40) {
// if ((serverScore + returnerScore) % 2 == 0) {
// return "Ad";
// }
// else
// {
// return "Deuce";
// }
// }
// else {
// if ((serverScore + returnerScore) % 2 == 0) {
// return "Deuce";
// }
// else
// {
// return "Ad";
// }
// }

// }
// function doubleFault(serverName) {
// if (returnerScore < 30) {
// returnerScore += 15;
// }
// else if (returnerScore < 40) {
// returnerScore += 10;
// }
// else {
// if (serverName == 'Player1') {
// player2GameScore += 1;
// serverScore = 0;
// returnerScore = 0;
// }
// else
// {
// player1GameScore += 1;
// serverScore = 0;
// returnerScore = 0;
// }
>>>>>>> main
// }
// }
function ace(serverName) {
if (serverScore < 30) {
<<<<<<< HEAD
serverScore += 15
} else if (serverScore < 40) {
serverScore += 10
Expand Down Expand Up @@ -333,60 +189,6 @@ function ace(serverName) {
// returnerScore += 1
// } else {
// serverScore += 1
=======
serverScore += 15;
}
else if (serverScore < 40) {
serverScore += 10;
}
else {
if (serverName == 'Player1') {
player1GameScore += 1;
serverScore = 0;
returnerScore = 0;
}
else
{
player2GameScore += 1;
serverScore = 0;
returnerScore = 0;
}
}
}
// function updateTiebreakScore(shotInRally, isWinner, serverName) {
// if ((shotInRally % 2 == 0) &
// isWinner == '1') {
// if (serverName == 'Player1') {
// returnerScore += 1;
// }
// else {
// serverScore += 1;
// }
// }
// else if ((shotInRally % 2 == 0)) {
// if (serverName == 'Player1') {
// serverScore += 1;
// }
// else {
// returnerScore += 1;
// }
// }
// else if ((shotInRally % 2 == 1) &
// isWinner == '1') {
// if (serverName == 'Player1') {
// serverScore += 1;
// }
// else {
// returnerScore += 1;
// }
// }
// else {
// if (serverName == 'Player1') {
// returnerScore += 1;
// }
// else {
// serverScore += 1;
>>>>>>> main
// }
// }
// }
Expand Down Expand Up @@ -727,11 +529,7 @@ export const getTaggerButtonData = (
// serverName
updateActiveRow('serverName', serverName)
// serverSide
<<<<<<< HEAD
updateActiveRow('serverFarNear', serverFarNear)
=======
updateActiveRow('serverFarNear', serverFarNear);
>>>>>>> main
// updateActiveRow('side', serverSide);
// check Ace after adding new row
if (isAce) {
Expand Down Expand Up @@ -767,16 +565,9 @@ export const getTaggerButtonData = (
if ((data.y >= 10) & (data.y <= 245)) {
updateActiveRow('firstServeIn', '1')
if (isAce) {
<<<<<<< HEAD
setCurrentPage('PointScore')
} else {
setCurrentPage('GroundstrokeContact')
=======
setCurrentPage('PointScore');
}
else {
setCurrentPage('GroundstrokeContact');
>>>>>>> main
}
} else {
updateActiveRow('firstServeIn', '0')
Expand All @@ -787,16 +578,9 @@ export const getTaggerButtonData = (
if ((data.y >= 10) & (data.y <= 245)) {
updateActiveRow('firstServeIn', '1')
if (isAce) {
<<<<<<< HEAD
setCurrentPage('PointScore')
} else {
setCurrentPage('GroundstrokeContact')
=======
setCurrentPage('PointScore');
}
else {
setCurrentPage('GroundstrokeContact');
>>>>>>> main
}
} else {
updateActiveRow('firstServeIn', '0')
Expand Down Expand Up @@ -1008,7 +792,6 @@ export const getTaggerButtonData = (
} else {
setCurrentPage('GroundstrokeContact')
}
<<<<<<< HEAD
} else {
updateActiveRow('secondServeIn', '0')
updateActiveRow('isPointEnd', '1')
Expand All @@ -1023,28 +806,6 @@ export const getTaggerButtonData = (
setCurrentPage('PointScore')
} else {
setCurrentPage('GroundstrokeContact')
=======
else {
setCurrentPage('GroundstrokeContact');
}
}
else
{
updateActiveRow('secondServeIn', '0');
updateActiveRow('isPointEnd', '1');
updateActiveRow('pointEndTime', data.videoTimestamp + 10);
setCurrentPage('PointScore');
}
}
else if (data.x >= -101 & data.x <= -54)
{
updateActiveRow('secondServeZone', 'Body');
if (data.y >= 10 & data.y <= 245)
{
updateActiveRow('secondServeIn', '1');
if (isAce == '1') {
setCurrentPage('PointScore');
>>>>>>> main
}
} else {
updateActiveRow('secondServeIn', '0')
Expand Down

0 comments on commit 5c6543b

Please sign in to comment.