Yaptığım Tetris Oyunu

Bu konuyu okuyanlar

Frosa

Müdavim
Katılım
22 Ağustos 2017
Mesajlar
3,154
Reaksiyon puanı
1,414
Puanları
113
Bir yerden gördüm. Ben de meraklandım. Şöyle bir küçük bir oyun ortaya çıkardım umarım bu oyunu beğenirsiniz. Yakında Shiftdelete Edition gelecek. :D
İyi Oyunlar... :)
tetris.png

Link: By Huso Tetris V1
 

Scalh

Doçent
Katılım
13 Ağustos 2017
Mesajlar
615
Reaksiyon puanı
273
Puanları
63
Sanki bir yerlerden (ç)alıntı gibi :)
 

Halktan Biri

Müdavim
Emektar
Katılım
30 Ekim 2016
Mesajlar
9,401
Reaksiyon puanı
9,163
Puanları
113
Nedense Yandex Disk'e yüklü olan şeyleri indireyemiyorum. Belki de kullandığım tarayıcıdan ya da tarayıcı eklentisinden kaynaklıdır.
Bir yerden gördüm :D Türkçeleştirdim hele o logoyu yazarken gözlerim ağrıdı. :D
Ben de bir ara bat oyunlarıyla uğraşıyordum. Şu da benim düzenlediğim bir bat oyununun kodları. :)
Kod:
@title Tic-Tac-Toe  [Dzenleyen: Halktan Biri]
@echo off
color 3f
mode 65,20
cls
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a:%%b)
echo -------------------------------------------
echo  Tic-Tac-Toe'ye HoŸ Geldiniz    Saat: %mytime%
echo -------------------------------------------
echo.
echo -Oyun nasl oynanr?
echo X'ten baŸlyorsunuz ve ilk siz baŸlyorsunuz.
echo Se‡im yapmak i‡in 1'den 9'a kadar olan saylar kullanmalsnz.
echo Sayy girdikten sonra Enter'a basmalsnz.
echo.
pause
::Edited By Halktan Biri
::Dzenleyen: Halktan Biri
:TTTSTART
cls
set /a ttt1=1
set /a ttt2=2
set /a ttt3=3
set /a ttt4=4
set /a ttt5=5
set /a ttt6=6
set /a ttt7=7
set /a ttt8=8
set /a ttt9=9
set /a tttturns=0

:PLAYERTURN
cls
echo Turn count: %tttturns%
echo.
echo  %ttt1% %ttt2% %ttt3%
echo  %ttt4% %ttt5% %ttt6%
echo  %ttt7% %ttt8% %ttt9%
echo.
echo Nereye gitmek istersin?
set /p "tttpchoice=>"
if "%tttpchoice%"=="1" if "%ttt1%"=="1" (
set ttt1=X
goto :PLAYERTURNEND
)
if "%tttpchoice%"=="2" if "%ttt2%"=="2" (
set ttt2=X
goto :PLAYERTURNEND
)
if "%tttpchoice%"=="3" if "%ttt3%"=="3" (
set ttt3=X
goto :PLAYERTURNEND
)
if "%tttpchoice%"=="4" if "%ttt4%"=="4" (
set ttt4=X
goto :PLAYERTURNEND
)
if "%tttpchoice%"=="5" if "%ttt5%"=="5" (
set ttt5=X
goto :PLAYERTURNEND
)
if "%tttpchoice%"=="6" if "%ttt6%"=="6" (
set ttt6=X
goto :PLAYERTURNEND
)
if "%tttpchoice%"=="7" if "%ttt7%"=="7" (
set ttt7=X
goto :PLAYERTURNEND
)
if "%tttpchoice%"=="8" if "%ttt8%"=="8" (
set ttt8=X
goto :PLAYERTURNEND
)
if "%tttpchoice%"=="9" if "%ttt9%"=="9" (
set ttt9=X
goto :PLAYERTURNEND
)
echo.
echo Hatal giriŸ.
pause
goto :PLAYERTURN

:PLAYERTURNEND
set /a tttturns+=1
goto :TTTCHECK

:COMPUTERFIRSTTURN
if not %ttt5%== X set ttt5=O
if %ttt5%== X set ttt1=O
set /a tttturns+=1
goto :TTTCHECK

:COMPUTERTURN
REM C-Left to Right
if "%ttt1%"=="O" if "%ttt2%"=="O" if "%ttt3%"=="3" (
set ttt3=O
goto :COMPUTERTURNEND
)
if "%ttt4%"=="O" if "%ttt5%"=="O" if "%ttt6%"=="6" (
set ttt6=O
goto :COMPUTERTURNEND
)
if "%ttt7%"=="O" if "%ttt8%"=="O" if "%ttt9%"=="9" (
set ttt9=O
goto :COMPUTERTURNEND
)
REM C-Top to Bottom
if "%ttt1%"=="O" if "%ttt4%"=="O" if "%ttt7%"=="7" (
set ttt7=O
goto :COMPUTERTURNEND
)
if "%ttt2%"=="O" if "%ttt5%"=="O" if "%ttt8%"=="8" (
set ttt8=O
goto :COMPUTERTURNEND
)
if "%ttt3%"=="O" if "%ttt6%"=="O" if "%ttt9%"=="9" (
set ttt9=O
goto :COMPUTERTURNEND
)
REM C-Rigth to Left
if "%ttt3%"=="O" if "%ttt2%"=="O" if "%ttt1%"=="1" (
set ttt1=O
goto :COMPUTERTURNEND
)
if "%ttt6%"=="O" if "%ttt5%"=="O" if "%ttt4%"=="4" (
set ttt4=O
goto :COMPUTERTURNEND
)
if "%ttt9%"=="O" if "%ttt8%"=="O" if "%ttt7%"=="7" (
set ttt7=O
goto :COMPUTERTURNEND
)
REM C-Bottom to Top
if "%ttt7%"=="O" if "%ttt4%"=="O" if "%ttt1%"=="1" (
set ttt1=O
goto :COMPUTERTURNEND
)
if "%ttt8%"=="O" if "%ttt5%"=="O" if "%ttt2%"=="2" (
set ttt2=O
goto :COMPUTERTURNEND
)
if "%ttt9%"=="O" if "%ttt6%"=="O" if "%ttt3%"=="3" (
set ttt3=O
goto :COMPUTERTURNEND
)
REM C-Diagnol Corners
if "%ttt9%"=="O" if "%ttt5%"=="O" if "%ttt1%"=="1" (
set ttt1=O
goto :COMPUTERTURNEND
)
if "%ttt7%"=="O" if "%ttt5%"=="O" if "%ttt3%"=="3" (
set ttt3=O
goto :COMPUTERTURNEND
)
if "%ttt3%"=="O" if "%ttt5%"=="O" if "%ttt7%"=="7" (
set ttt7=O
goto :COMPUTERTURNEND
)
if "%ttt1%"=="O" if "%ttt5%"=="O" if "%ttt9%"=="9" (
set ttt9=O
goto :COMPUTERTURNEND
)
REM C-Side Centers
if "%ttt1%"=="O" if "%ttt3%"=="O" if "%ttt2%"=="2" (
set ttt2=O
goto :COMPUTERTURNEND
)
if "%ttt3%"=="O" if "%ttt9%"=="O" if "%ttt6%"=="6" (
set ttt6=O
goto :COMPUTERTURNEND
)
if "%ttt9%"=="O" if "%ttt7%"=="O" if "%ttt8%"=="8" (
set ttt8=O
goto :COMPUTERTURNEND
)
if "%ttt7%"=="O" if "%ttt1%"=="O" if "%ttt4%"=="4" (
set ttt4=O
goto :COMPUTERTURNEND
)
REM P-Left to Right
if "%ttt1%"=="X" if "%ttt2%"=="X" if "%ttt3%"=="3" (
set ttt3=O
goto :COMPUTERTURNEND
)
if "%ttt4%"=="X" if "%ttt5%"=="X" if "%ttt6%"=="6" (
set ttt6=O
goto :COMPUTERTURNEND
)
if "%ttt7%"=="X" if "%ttt8%"=="X" if "%ttt9%"=="9" (
set ttt9=O
goto :COMPUTERTURNEND
)
REM P-Top to Bottom
if "%ttt1%"=="X" if "%ttt4%"=="X" if "%ttt7%"=="7" (
set ttt7=O
goto :COMPUTERTURNEND
)
if "%ttt2%"=="X" if "%ttt5%"=="X" if "%ttt8%"=="8" (
set ttt8=O
goto :COMPUTERTURNEND
)
if "%ttt3%"=="X" if "%ttt6%"=="X" if "%ttt9%"=="9" (
set ttt9=O
goto :COMPUTERTURNEND
)
REM P-Rigth to Left
if "%ttt3%"=="X" if "%ttt2%"=="X" if "%ttt1%"=="1" (
set ttt1=O
goto :COMPUTERTURNEND
)
if "%ttt6%"=="X" if "%ttt5%"=="X" if "%ttt4%"=="4" (
set ttt4=O
goto :COMPUTERTURNEND
)
if "%ttt9%"=="X" if "%ttt8%"=="X" if "%ttt7%"=="7" (
set ttt7=O
goto :COMPUTERTURNEND
)
REM P-Bottom to Top
if "%ttt7%"=="X" if "%ttt4%"=="X" if "%ttt1%"=="1" (
set ttt1=O
goto :COMPUTERTURNEND
)
if "%ttt8%"=="X" if "%ttt5%"=="X" if "%ttt2%"=="2" (
set ttt2=O
goto :COMPUTERTURNEND
)
if "%ttt9%"=="X" if "%ttt6%"=="X" if "%ttt3%"=="3" (
set ttt3=O
goto :COMPUTERTURNEND
)
REM P-Diagnol Corners
if "%ttt9%"=="X" if "%ttt5%"=="X" if "%ttt1%"=="1" (
set ttt1=O
goto :COMPUTERTURNEND
)
if "%ttt7%"=="X" if "%ttt5%"=="X" if "%ttt3%"=="3" (
set ttt3=O
goto :COMPUTERTURNEND
)
if "%ttt3%"=="X" if "%ttt5%"=="X" if "%ttt7%"=="7" (
set ttt7=O
goto :COMPUTERTURNEND
)
if "%ttt1%"=="X" if "%ttt5%"=="X" if "%ttt9%"=="9" (
set ttt9=O
goto :COMPUTERTURNEND
)
REM P-Side Centers
if "%ttt1%"=="X" if "%ttt3%"=="X" if "%ttt2%"=="2" (
set ttt2=O
goto :COMPUTERTURNEND
)
if "%ttt3%"=="X" if "%ttt9%"=="X" if "%ttt6%"=="6" (
set ttt6=O
goto :COMPUTERTURNEND
)
if "%ttt9%"=="X" if "%ttt7%"=="X" if "%ttt8%"=="8" (
set ttt8=O
goto :COMPUTERTURNEND
)
if "%ttt7%"=="X" if "%ttt1%"=="X" if "%ttt4%"=="4" (
set ttt4=O
goto :COMPUTERTURNEND
)
REM P-Opposites
if "%ttt1%"=="X" if "%ttt9%"=="X" if "%ttt3%"=="3" (
set ttt3=O
goto :COMPUTERTURNEND
)
if "%ttt1%"=="X" if "%ttt9%"=="X" if "%ttt6%"=="7" (
set ttt7=O
goto :COMPUTERTURNEND
)
if "%ttt3%"=="X" if "%ttt7%"=="X" if "%ttt1%"=="1" (
set ttt1=O
goto :COMPUTERTURNEND
)
if "%ttt3%"=="X" if "%ttt7%"=="X" if "%ttt9%"=="9" (
set ttt9=O
goto :COMPUTERTURNEND
)
REM Random
if "%ttt1%"=="1" (
set ttt1=O
goto :COMPUTERTURNEND
)
if "%ttt2%"=="2" (
set ttt2=O
goto :COMPUTERTURNEND
)
if "%ttt3%"=="3" (
set ttt3=O
goto :COMPUTERTURNEND
)
if "%ttt4%"=="4" (
set ttt4=O
goto :COMPUTERTURNEND
)
if "%ttt5%"=="5" (
set ttt5=O
goto :COMPUTERTURNEND
)
if "%ttt6%"=="6" (
set ttt6=O
goto :COMPUTERTURNEND
)
if "%ttt7%"=="7" (
set ttt7=O
goto :COMPUTERTURNEND
)
if "%ttt8%"=="8" (
set ttt8=O
goto :COMPUTERTURNEND
)
if "%ttt9%"=="9" (
set ttt9=O
goto :COMPUTERTURNEND
)

:COMPUTERTURNEND
set /a tttturns+=1
goto :TTTCHECK

:TTTCHECK
REM P-Horizontal
if "%ttt1%"=="X" if "%ttt2%"=="X" if "%ttt3%"=="X" goto :TTTPLAYERWIN
if "%ttt4%"=="X" if "%ttt5%"=="X" if "%ttt6%"=="X" goto :TTTPLAYERWIN
if "%ttt7%"=="X" if "%ttt8%"=="X" if "%ttt9%"=="X" goto :TTTPLAYERWIN
REM P-Vertical
if "%ttt1%"=="X" if "%ttt4%"=="X" if "%ttt7%"=="X" goto :TTTPLAYERWIN
if "%ttt2%"=="X" if "%ttt5%"=="X" if "%ttt8%"=="X" goto :TTTPLAYERWIN
if "%ttt3%"=="X" if "%ttt6%"=="X" if "%ttt9%"=="X" goto :TTTPLAYERWIN
REM P-Diagnol
if "%ttt1%"=="X" if "%ttt5%"=="X" if "%ttt9%"=="X" goto :TTTPLAYERWIN
if "%ttt3%"=="X" if "%ttt5%"=="X" if "%ttt7%"=="X" goto :TTTPLAYERWIN
REM C-Horizontal
if "%ttt1%"=="O" if "%ttt2%"=="O" if "%ttt3%"=="O" goto :TTTCOMPUTERWIN
if "%ttt4%"=="O" if "%ttt5%"=="O" if "%ttt6%"=="O" goto :TTTCOMPUTERWIN
if "%ttt7%"=="O" if "%ttt8%"=="O" if "%ttt9%"=="O" goto :TTTCOMPUTERWIN
REM C-Vertical
if "%ttt1%"=="O" if "%ttt4%"=="O" if "%ttt7%"=="O" goto :TTTCOMPUTERWIN
if "%ttt2%"=="O" if "%ttt5%"=="O" if "%ttt8%"=="O" goto :TTTCOMPUTERWIN
if "%ttt3%"=="O" if "%ttt6%"=="O" if "%ttt9%"=="O" goto :TTTCOMPUTERWIN
REM C-Diagnol
if "%ttt1%"=="O" if "%ttt5%"=="O" if "%ttt9%"=="O" goto :TTTCOMPUTERWIN
if "%ttt3%"=="O" if "%ttt5%"=="O" if "%ttt7%"=="O" goto :TTTCOMPUTERWIN
REM Continue
if "%tttturns%"=="0" goto :PLAYERTURN
if "%tttturns%"=="1" goto :COMPUTERFIRSTTURN
if "%tttturns%"=="2" goto :PLAYERTURN
if "%tttturns%"=="3" goto :COMPUTERTURN
if "%tttturns%"=="4" goto :PLAYERTURN
if "%tttturns%"=="5" goto :COMPUTERTURN
if "%tttturns%"=="6" goto :PLAYERTURN
if "%tttturns%"=="7" goto :COMPUTERTURN
if "%tttturns%"=="8" goto :PLAYERTURN
if "%tttturns%"=="9" goto :COMPUTERTURN
if "%tttturns%"=="10" goto :TTTTIE
if "%tttturns%"=="11" goto :TTTERROR

:TTTERROR
cls
echo Turn count: %tttturns%
echo.
echo  %ttt1% %ttt2% %ttt3%
echo  %ttt4% %ttt5% %ttt6%
echo  %ttt7% %ttt8% %ttt9%
echo.
echo Bir sorun ‡kt. Ltfen oyunu yeniden baŸlatn.
echo.
pause
goto :TTTEXIT

:TTTPLAYERWIN
cls
echo Turn count: %tttturns%
echo.
echo  %ttt1% %ttt2% %ttt3%
echo  %ttt4% %ttt5% %ttt6%
echo  %ttt7% %ttt8% %ttt9%
echo.
echo Tebrikler! Kazandnz.
echo.
pause
goto :TTTREMATCH

:TTTCOMPUTERWIN
cls
echo Turn count: %tttturns%
echo.
echo  %ttt1% %ttt2% %ttt3%
echo  %ttt4% %ttt5% %ttt6%
echo  %ttt7% %ttt8% %ttt9%
echo.
echo Bilgisayar kazand.
echo.
pause
goto :TTTREMATCH

:TTTTIE
cls
echo Turn count: %tttturns%
echo.
echo  %ttt1% %ttt2% %ttt3%
echo  %ttt4% %ttt5% %ttt6%
echo  %ttt7% %ttt8% %ttt9%
echo.
echo Kazanan yok.
echo.
pause
goto :TTTREMATCH

:TTTREMATCH
echo.
echo Tekrar denemek isterseniz Evet yazp Enter'a basn. (Evet)
echo €kmak isterseniz Hayr yazp Enter'a basn. (Hayr)
set /p "tttrematch=>"
if "%tttrematch%"=="EVET" goto :TTTSTART
if "%tttrematch%"=="Evet" goto :TTTSTART
if "%tttrematch%"=="evet" goto :TTTSTART
if "%tttrematch%"=="e" goto :TTTSTART
if "%tttrematch%"=="E" goto :TTTSTART
if "%tttrematch%"=="Ev" goto :TTTSTART
if "%tttrematch%"=="Ha" goto :EXIT
if "%tttrematch%"=="Hay" goto :EXIT
if "%tttrematch%"=="Hayr" goto :EXIT
:EXIT
exit
 
Üst