simulation.html 8.86 KB
<!DOCTYPE html>
<html>
<head>
    <title> Simulation </title>
    <link rel="stylesheet" type="text/css"href="simulation.css">
    <script src = "kia.js"></script>
    <script src = "dusan.js"></script>
    <script src = "algorithm.js"></script>
    <script src = "shuffle_list.js"></script>
    <script src = "aaaa.js"></script>
    <script src = "temp_algorithm.js"></script>
    <script>
        var wonjung=8;
        var home=6;
        function imgchange1(a){
            var img=document.getElementById("wonjung");
            if(a==1){
                wonjung=1;
                img.setAttribute("src","pngs/samsung.png");
            }
            else if(a==2){
                wonjung=2;
                img.setAttribute("src","pngs/nc.png");
            }
            else if(a==3){
                wonjung=3;
                img.setAttribute("src","pngs/LG.png");
            }
            else if(a==4){
                wonjung=4;
                img.setAttribute("src","pngs/kt.png");
            }
            else if(a==5){
                wonjung=5;
                img.setAttribute("src","pngs/ssg.png");
            }
            else if(a==6){
                wonjung=6;
                img.setAttribute("src","pngs/dusan.png");
            }
            else if(a==7){
                wonjung=7;
                img.setAttribute("src","pngs/kiwoom.png");
            }
            else if(a==8){
                wonjung=8;
                img.setAttribute("src","pngs/kia.png");
            }
            else if(a==9){
                wonjung=9;
                img.setAttribute("src","pngs/hanhwa.png");
            }
            else if(a==10){
                wonjung=10;
                img.setAttribute("src","pngs/Lotte.png");
            }
        }
        function imgchange2(a){
            var img=document.getElementById("home");
            if(a==1){
                home=1;
                img.setAttribute("src","pngs/samsung.png");
            }
            else if(a==2){
                home=2;
                img.setAttribute("src","pngs/nc.png");
            }
            else if(a==3){
                home=3;
                img.setAttribute("src","pngs/LG.png");
            }
            else if(a==4){
                home=4;
                img.setAttribute("src","pngs/kt.png");
            }
            else if(a==5){
                home=5;
                img.setAttribute("src","pngs/ssg.png");
            }
            else if(a==6){
                home=6;
                img.setAttribute("src","pngs/dusan.png");
            }
            else if(a==7){
                home=7;
                img.setAttribute("src","pngs/kiwoom.png");
            }
            else if(a==8){
                home=8;
                img.setAttribute("src","pngs/kia.png");
            }
            else if(a==9){
                home=9;
                img.setAttribute("src","pngs/hanhwa.png");
            }
            else if(a==10){
                home=10;
                img.setAttribute("src","pngs/Lotte.png");
            }
        }
        
    </script>
</head>
<body>
    <div class="container1">
        <span class="logo">Welcome to Baseball Simulator</span>
    </div>
    <nav id="menu">
            <ul>
                <li>
                    <a class="me" href="main.html">Home</a>
                </li>
                <li>
                    <a class="me" href="introduction.html">Introduction</a>
                </li>
                <li>
                    <a class="me" href="calendar.html">Calendar</a>
                </li>
                <li>
                    <a class="me" href="simulation.html">Simulation</a>
                </li>
            </ul>
        </nav>
    <div class="container2">
        <div class="a">
            <p class="team">원정팀</p>
        </div>
        <div class="selection">
            <div class="row row1">
                <button type="submit" onclick="imgchange1(1)" class="t1">삼성</button>
                <button type="submit" onclick="imgchange1(2)" class="t1">NC</button>
                <button type="submit" onclick="imgchange1(3)" class="t1">LG</button>
                <button type="submit" onclick="imgchange1(4)" class="t1">KT</button>
                <button type="submit" onclick="imgchange1(5)" class="t1">SSG</button>
            </div>
            <div class="row row2">
                <button type="submit" onclick="imgchange1(6)" class="t1">두산</button>
                <button type="submit" onclick="imgchange1(7)" class="t1">키움</button>
                <button type="submit" onclick="imgchange1(8)" class="t1">KIA</button>
                <button type="submit" onclick="imgchange1(9)" class="t1">한화</button>
                <button type="submit" onclick="imgchange1(10)" class="t1">롯데</button>
            </div>
        </div>
        <div class="tb">
            <table>
                <tbody>
                    <tr>
                        <td>1번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>2번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>3번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>4번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>5번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>6번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>7번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>8번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>9번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>선발 투수</td><td>-</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="container3">
        <div class="l">
            <img src="pngs/kia.png" id="wonjung" class="vs" style="margin:0px 0px 0px 50px;">
        </div>
        <div class="l">
            <p id="vss">VS</p>
        </div>
        <div class="l">
            <img src="pngs/dusan.png" id="home" class="vs">
        </div>
        <div class="simul">
            <div class="but">
                <input type="button" onclick=pre_algorithm() class="simulbtr" value="시뮬레이션">
            </div>
            <div class="result">

            </div>
        </div>
        <div id="jstest"></div>
    </div>
    <div class="container4">
        <div class="a">
            <p class="team">홈팀</p>
        </div>
        <div class="selection">
            <div class="row row1">
                <button type="submit" onclick="imgchange2(1)" class="t2">삼성</button>
                <button type="submit" onclick="imgchange2(2)" class="t2">NC</button>
                <button type="submit" onclick="imgchange2(3)" class="t2">LG</button>
                <button type="submit" onclick="imgchange2(4)" class="t2">KT</button>
                <button type="submit" onclick="imgchange2(5)" class="t2">SSG</button>
            </div>
            <div class="row row2">
                <button type="submit" onclick="imgchange2(6)" class="t2">두산</button>
                <button type="submit" onclick="imgchange2(7)" class="t2">키움</button>
                <button type="submit" onclick="imgchange2(8)" class="t2">KIA</button>
                <button type="submit" onclick="imgchange2(9)" class="t2">한화</button>
                <button type="submit" onclick="imgchange2(10)" class="t2">롯데</button>
            </div>
        </div>
        <div class="tb">
            <table>
                <tbody>
                    <tr>
                        <td>1번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>2번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>3번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>4번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>5번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>6번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>7번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>8번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>9번 타자</td><td>-</td>
                    </tr>
                    <tr>
                        <td>선발 투수</td><td>-</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</body>
</html>