Compare commits

...

3 Commits

Author SHA1 Message Date
3c9c2a6e9f naprawa bledu, ktory blokal ponownie dodanie bramkarza 2024-01-06 20:41:17 +01:00
41380fbfcf update 2024-01-06 17:24:34 +01:00
8befeef8ed update 2024-01-06 17:20:47 +01:00
2 changed files with 10 additions and 10 deletions

View File

@ -25,8 +25,8 @@ const Hero = () => {
// zmienne globalne bedace danymi wejsciowymi do modelu
var shooterX = 0;
var shooterY = 0;
var shooterX = 12;
var shooterY = 12;
//zamiana procentowych pozycji na kartezyjskie
function konwerturX(x){
@ -38,8 +38,6 @@ const Hero = () => {
return Math.round(fY*68)/100
}
function changePlayer(a){
document.getElementById("bbt1").style.background = "#99FFCC";
@ -77,6 +75,7 @@ const Hero = () => {
number_of_defenders = 0
number_of_strikers = 0
number_of_goalkeepers = 0
numer_od_shooters = 0
}
@ -90,13 +89,16 @@ const Hero = () => {
list.removeChild(player)
bojo.removeChild(ball)
if(possition == 1){
number_of_goalkeepers = number_of_goalkeepers -1
number_of_goalkeepers = 0
}else if(possition == 2){
number_of_defenders = number_of_defenders -1 ;
}else if (possition == 3){
number_of_strikers = number_of_strikers -1 ;
}else if(possition == 0){
numer_od_shooters = 0
}
}
function addPlayer(possition, ball){
//Zmiana stylu w zaleznosci czy zawodnik jest obronca/napastnikiem iyp.
var pName = "Strzelec"
@ -162,9 +164,7 @@ const Hero = () => {
// listenery pozwalające na przesuwanie punktu
ball.addEventListener("mousedown", function przesuwanie(){
ball.style.background = "orange"
@ -183,8 +183,8 @@ const Hero = () => {
tekst.style.color = "white"
posytion.style.color = "white"
x = parseFloat(x) + 1
y = parseFloat(y) + 1
x = parseFloat(x) -2
y = parseFloat(y) -2
if(bojo.parentNode.querySelector(":hover")){
ball.style.left = x + "%"