Undang Undang Agraria 1870

UndangUndang Agraria 1870Pada tahun 1870, pemerintahan Hindia Belanda memasuki masa ekonomi-liberal, yaitu dengan disahkannya Undang-Undang Agraria (Agrarische Wet) yang dikeluarkan Parlemen Belanda. Tokoh yang mengeluarkan undang-undang ini yakni de Waal, Menteri Jajahan dan Perniagaan Belanda. Secara umum, Undang- Undang Agraria 1870 bertujuan melindungi hak milik petani atas tanahnya dan penguasaan pemodal asing, memdiberi peluang pada pemodal gila untuk menyewa tanah dari penduduk Indonesia, dan membuka peluang kerja pada penduduk Indonesia, terutama buruh pekerjaan.

Dalam Undang-Undang Agraria 1870 secara terperinci disebutkan bahwa gubernur jenderal tidak diperbolehkan menjual tanah pemerintah. Tanah sanggup disewakan paling usang 75 tahun. Yang disebutkan sebagai tanah milik pemerintah yakni hutan yang belum dibuka, tanah yang berada di luar wilayah desa dan penghuninya, dan tanah milik adat. Sedangkan tanah penduduk yakni tiruana sawah, ladang, dan sejenisnya yang dimiliki pribadi oleh penduduk.

Tanah semacam itu sanggup disewa oleh pihak gila selama lima tahun. Pengusaha swasta diperkenanan seluas-luasnya untuk menanamkan modalnya di Indonesia. Kebebasan dan keamanan para pengusaha dijamin. Hanya orang Indonesialah yang berhak mempunyai tanah, tetapi orang-orang gila diperbolehkan untuk menyewa dari pemerintah hingga selama tujuh puluh lima tahun. Masa ini dikenal dengan istilah “Politik Pintu Terbuka” atau “Open Door Policy”.

Jenis perkebunan yang dibuka contohnya gula, tebu, kopi, tembakau, teh, kina, kopra, dan sebagainya. Untuk kelancaran produksi flora ekspor pemerintah Hindia Belanda membangun waduk-waduk, terusan irigasi, jalan kereta api dan dermaga pelabuhan. Untuk pekerjaan ini kembali pemerintah Belanda mengerahkan tenaga rakyat dengan kerja rodi. Hal ini tentu membawa kesengsaraan bagi rakyat.

 pemerintahan Hindia Belanda memasuki masa ekonomi UNDANG UNDANG AGRARIA 1870


Lebih-lebih setelah tahun 1885 harga-harga komoditas ekspor menurun di pamasukan alasannya daerahdaerah di Eropa mulai menanam dan memproduksi gula, sama dengan produksi lainnya mengalami penurunan. Karena itu pada tahun 1885–1900 disebut masa krisis perkebunan. Kemudian pada selesai kala ke-19 muncullah Koreksi-Koreksi yang tajam terhadap pemerintah Hindia Belanda dan praktik liberalisme yang gagal memperbaiki nasib kehidupan rakyat jajahan.





Versi bahan oleh Triyono Suwito dan Wawan Darmawan


Sumber http://www.ssbelajar.net

Pengertian Ciri Teladan Macam Sektor Perjuangan Informal

Pengertian Ciri misal Macam Sektor Usaha Informal – Adalah Selain sektor perjuangan formal, terdapat sektor perjuangan informal dalam masyarakat. Sektor perjuangan informal yakni unit perjuangan atau aktivitas ekonomi yang dilakukan oleh perseorangan atau beberapa orang yang sifatnya masih kecil/lemah, tidak mempunyai status aturan dan tidak mempunyai izin resmi dari pemerintah atau forum yang berwenang.



Adapun ciri-ciri sektor perjuangan informal yakni sebagai diberikut.
1. Dapat membuka lapangan kerja yang tidak sedikit jumlahnya.
2. Tidak mempunyai pendidikan/keahlian khusus.
3. Hanya mempunyai ruang lingkup perjuangan ekonomi yang sempit dan kecil.
4. Tidak mempunyai alat-alat produksi yang canggih.
5. Jumlah modal yang dimiliki relatif kecil.
6. Lebih cenderung bersifat padat karya.
7. Tempat perjuangan tidak tetap dan tidak terdaftar.



Beberapa aktivitas ekonomi di sektor perjuangan informal yakni sebagai diberikut.
1. Pedagang kaki lima
Pedagang kaki lima menjual barangnya dengan memakai atau menentukan tempat-tempat yang strategis di tepi jalan, di sekeliling terminal bus, di stasiun kereta api, atau di bawah pohon yang teduh. Mereka menjual kebutuhan sehari-hari ibarat gula, roti, rokok, minuman dalam botol, dan sebagainya.
2. Pedagang keliling
Pedagang keliling yakni mereka yang menjual barangnya dengan cara menhadiri para konsumennya secara langsung. Biasanya mereka membawa barang dagangannya dari satu tempat ke tempat lain dengan kendaraan ibarat sepeda motor, sepeda kayuh, gerobak dorong, atau menggendong.

Pengertian Ciri misal Macam Sektor Usaha Informal PENGERTIAN CIRI CONTOH MACAM SEKTOR USAHA INFORMAL


3. Pedagang asongan
Para pedagang asongan biasanya mengatakan barang dagangannya dengan menyodorkannya kepada calon pembeli. Jenis barang yang diperdagangkan yakni barang-barang kebutuhan yang simpel dibawa, ibarat koran, rokok, permen, minuman dalam botol, mainan bawah umur dan sebagai-nya. Pedagang asongan sering kita jumpai di traffic light, di tempat-tempat pemberhentian bus, di stasiun kereta api, dan sebagainya.
4. Pedagang sambilan
Pedagang sambilan yakni pedagang yang melaksanakan kegiatannya tidak secara rutin, tetapi spesialuntuk pada dikala tertentu. Kegiatan itu selain untuk menambah penghasilan juga sebagai pengisi waktu luang. Misalnya, di daerahdaerah proyek pembangunan kita sering menjumpai munculnya pedagangpedagang sambilan.

Apakah Peranan Sektor Usaha Informal?



Sebelumnya terkena Landasan Asas dan Prinsip Koperasi ini sanggup menambah pengetahuan anda


Sektor perjuangan informal mempunyai peranan cukup besar terhadap perkembangan kehidupan ekonomi nasional. Adapun peranan sektor perjuangan informal, antara lain sebagai diberikut.
1. Meningkatkan pendapatan masyarakat.
2. Memmenolong menyediakan lapangan pekerjaan.
3. Menambah pendapatan kawasan melalui retribusi daerah.
4. Megampangkan konsumen dalam melaksanakan pembelian sesuai dengan selera dan daya belinya.

Dampak negatif sektor perjuangan informal antara lain sebagai diberikut.
1. Mengganggu keindahan kota.
2. Mengganggu ketertiban dan keamanan kemudian lintas.
3. Mengganggu dan mengurangi kenyamanan masyarakat.


Sumber http://www.ssbelajar.net

How To Increase My Website Traffic

We visit many sites for many reasons. There are many sites those have a great traffic and great income for that. If we have a website of our own, we can feel that how hard to get a good traffic. Many time we don't get any visitors for many days /weeks though there are many exciting posts in the website. There are many reasons for those type of problems. Sometimes a website with a high traffic also gets those type of problems.

But you are asking, how I can solve those problems and get a high traffic? How? How and How? We have a great solution for you.
To solve your problem read this article with full attention. It will help you much to get great traffic/visitors per day.

Why Low Traffic?


lowtrafficl.theapimes.jpg

Many people are getting low traffic in their websites. An unplanned article and website subjects. If you are working on a website which have no targeted subjects, you are sure to get low traffic. Are you writing articles too small or big? It may the main reason for not getting good traffic. if you have a blog it must have great words and you have to care about writing blog not too boring, so that your visitors don't get annoyed or sleep. If you don't choose a definite category and tags for the article of your website it may cause low traffic. If you don't have a good exciting and attractive words or images it will not bring good traffic. If you are writing a big details which may you don't write it can be the cause of it. If you are not trying to index your website in search engines or make your website private, it is definitely the main cause of low traffic. If you are redirecting your site it will bring low traffic. If you don't set a good feature image, not making great content and don't have any description about your site, it will bring low traffic.

Getting No Traffic!


WebsiteLostInDesert.jpg

If you are getting no traffic in your site, I think your website lost in desert. I think you are not making any new posts for your site or you may have not any good content. If you don't write at least 7-13 post for your site per month, you will not get any traffic and you must have up to 10 post in your site. I think you are not chosen a popular subject for your site. If you are doing any illegal or any harmful or do anything like: copyright or plagiarism, you will not get any traffic (probably). If you have made a site with a sign-up needed form then your visitors will never visit your site again if you don't have any exciting and amazing contents. Or you have no good detailed contents.

How Can I Increase Traffic?


increasetraffic.jpg

There are many ways are open to you to increase/boost your website traffic more and more. You can see changes in few days/ a week. I suggest you to take a drink in your hand before following these steps:

  1. You must make a good detail about your website, for this you can make a about page.

  2. Fill you website with good and beautiful contents which the most visitors want. They want attractive posts and little fun during reading an article.

  3. Always Make or Choose the Best and lovely feature image for your articles, so that can attract visitors.

  4. Make a definite decision about what you are working for in your website and don't choose a mostly common subjects and make category for your posts for making people find posts quickly.

  5. Always try to write articles in medium size like: 600-1200 words.

  6. Don't make the description of your article big or too small, try to write the main words in mostly the whole article. But don't try to skip the article description and last words.

  7. Choose a great tag for your posts so that the search engines can index your posts in the right searches.

  8. Warning! Do not try to copy others word! It will decrease your websites reputation and popularity.

  9. You can index a YouTube video so, that your visitors can understand your words better and it will many cause of great traffic.

  10. You should share your site/posts in most common social websites like: Facebook, Twitter, Google+, Instagram, etc.

  11. Use a custom domain for your site, it can increase 30% more traffic for your website.

  12. Share your site in most popular search engines and try adding some spices in your site.

  13. Use a Tagline and ask your friends, family members or others to give you feedback, so you can improve your website.

  14. Use AMP to boost your site loading speed in mobiles.

  15. Show related posts in every articles, so that people can find more article like what they was reading.

  16. Add search bar, contact page, comment bar, background image, up button, etc to make your site look like professional.

  17. Try to write articles daily and publish at least 2-3 articles per week.

  18. If you added Ad Sense in your website be aware of showing too much ads in your website.

  19. The main thing is the title of the article. You must select a perfect title for your article.

  20. You must choose the best theme according to your site subject.

  21. Main thing is visitors like standard and typical sites.

  22. Make sure your site have no grammatical problems.

  23. Make your articles on what you also feels the importance, if you feel that this kind of articles are important to read then others will also think so.

  24. You may add a live chat to your website so that the visitors can share their problems directly to you.

  25. This is the last step, wow! you completed all the steps (Is it true? I don't think so). Now analyze your site, test your site from Google analytics and take rest for few hours and then see your traffic.

Any Other Way?


web-traffic-bandw-1.jpg

If I say the truth, Yes you have. You can find Traffic Boosters from search engines. But you have to invest money to do so. But there are also few website which gives you a chance to get free visitors, you have to earn points to get visitors. They exchanges traffic. That means you have to visit others website to get visitors in your website. but they are kills much time and I don't suggest you them! In that time what you waste in those website you can do many other things. So, you may not use them. if you want to waste as much time as you can, you are invited to these site. Enjoy wasting your time:)

That's all. If you are willing to obey these steps you are sure to get a good traffic for your website. I am eager to know your site success by following those steps. Thanks.

If you liked our article please follow us and don't forget to like, share and comment.

Was this article helpful? Any questions? Comment Us

Best Way To Learn HTML and CSS: Design and Build Websites

Are you interested in HTML and CSS to Design and Build your own, uncommon, great and stylist websites? I think you are and it is common. There are many people who have a websites with great contents but for their websites CSS and sometimes for HTML many people ignore those contents. And for that a business can be in a great loss!

Every day, more and more people want to learn some HTML and CSS for their websites or for an income source. Joining the professional web designers and programmers are new audiences who need to know a little bit of code
(HTML & CSS) at work (update a content management system or e-commerce store, etc) and those who want to make their personal/professional blogs more attractive to others.

So, what can solve this and teach me HTML and CSS greatly? I think if you learn HTML & CSS from a teacher or any institution it will be easy to learn but more easy to forget. Next if you learn HTML & CSS from any websites it is much annoying because the will not teach you full HTML & CSS and it will be hard to practice them by those websites (even my site), though it can harm your body parts much and waste you time.

Then What? If I say from my experience it is better to learn HTML & CSS from books. Because if you are learning HTML from a Book it can save your time and you don't need to stop practicing practically for seeing further codes, the only thing you have to do is change your book's page. Yes, one thing that you need to understand codes yourself but it is the best because if you try to understand the codes yourself it will be remember-able for a longer time!
But there are many books which is not good enough to buy! But I have found a book that can be a great book for learning HTML & CSS coding (Not Telling Lies). The Book is: "HTML and CSS: Design and Build Websites" by Jon duckett. (hardcover: 152 Pages)

One thing I forget to tell, if you are learning from a book whenever you need you can repeat learning from and if you forget anything instantly you can get it!

The Book I told you, it is available as Hardcover and Paperback. Hardcover will cost a little more than Paperback.

[gallery ids="1478,1479" type="rectangular"]

Price:


New Condition:


Hardcover: 24.17$ [List Price: $42.00 Save: $17.83 (42%)]

Paperback: 11.50$ [List Price: $29.99 Save: $18.49 (62%)]

Used- Like New Condition:


Hardcover: 21.75$
If I say this is the best price to buy this book. You can get it from this low price. This book can make your dream true, if you practice hard :) You are thinking I am asking you to buy the book for my income but that's not true at all, yes I have a profit but for that I am not interested to cheat you!

I suggest you to buy 'Paperback' of this book if you don't wanna invest much on this book. If you want to  know more about the Book you must:


Read More


You can also know what others say about this book and what was the first impression of them!

And don't forget to like, share, comment and obviously follow us! Any question solve it form the 'Read More' button. Thanks

How To Make A Harmless Awesome Computer Virus Easily!

Are you being bored with your PC? Do you want to make a fun with others with your PC By A Harmless Virus???? If so then we are here to help you. Let Make An Awesome Computer Virus (harmless-Prank) and scare your friends/family or make them fooled! Are You Ready? To make this type of virus you will need notepad only and nothing else! Once you read and understand the code you can make it in your way and it's really easy to easier. We have also added a video at the end of the article for better understanding.



You can also download the Harmless virus from here directly or,

Follow the steps:


1. First Of All Download The Codes From Here.

Untitled 6

2. Then open it with notepad and in notepad click on the 'file' menu.

Untitled 7.jpg

3.  In file menu click on the 'save as' option and choose a name & destination to save.

Untitled 8.jpg

4.  Don't Save Now! After giving a name and choosing a destination just type '.vbs' after the virus name and choose save as type to 'all files' and click 'Save'.

Untitled 9.jpg

5. All Done!! Now Open The Virus and chick it yourself and make a prank!

Untitled 10.jpg

Oh, You may Read The Codes Description Before doing it so that you can make it in your way....

Codes Description:


• Write this code first:
X=MsgBox("Message Description",0+16,"Title")

1. X=MsgBox("",+,"")  is the main code for making this type of harmless awesome virus.

2. Instead of -Message Description: You can type anything you want to say in this.

3. Instead of -title: You can give it any title you want.

4. You can write any number from 1,2,3 or 4 instead of 0 (before the '+' symbol) Below is the meaning of these numbers:

  • 0 = OK Button,

  • 1 = OK / Cancel Button,

  • 2 = Abort / Retry / Ignore Button,

  • 3 = Yes / No / Cancel Button,

  • 4 = Yes / No Button,

  • 5 = Retry / Cancel Button

5. You can write 32 or 48 or 64 instead of 16. Below is the meaning of each number:

  • 16 = Critical Icon,

  • 32 = Help Icon,

  • 48 = Warning Icon,

  • 64 = Information Icon,

If You are Still Unable To Make This Perfectly Watch The Video:


[youtube https://youtu.be/5XlyzUcGTlo]

That's all and Don't Forget to follow us, like, share if you loved this. Comment if you have any questions. Thanks

How To Make A Simple Snake Game Using Notepad

Lets Make Our Own Snake Game in Notepad. Do You want to make it yourself? We play many games in our laptop/PC. Before playing action,adventure, etc game which we are playing at present, our main attraction was a game of a snake. Where you have to  feed a snake and make him longer and to survive. Now its the time to get that experience with a great joy, because you are going to make it yourself. So, Jump Inside Now!
First of all Open Notepad or Notepad++ from in your PC. Now Write or copy the codes step by step with reading the details.
[You can also download the codes from here, if you do that you may skip to step 23 or download the game directly]


You Can Also Watch Our Video To Learn It More Easily Which is Given Below!


Step 1:


@echo off
if "%~1" == "startGame" goto :game
if "%~1" == "startController" goto :controller

"@ECHO OFF" is used to prevent any of the commands in the batch file from being displayed, just the information outputted by the command.

"IF" is used to check for a certain condition if the condition exists. If that condition exists it performs that function.

"%"(the percent) is followed by a numeric value, beginning with one, allows you to add matched variables to a batch file.

• "GOTO" jumps to a label or section of a batch file. The goto can make it easy to jump back to the start or end of a batch file if a condition is met, or an error occurs.




Step 2:


setlocal disableDelayedExpansion

•  This code will be used to set up some global variables used by both the game and the controller.

•  The global varibales will make the game to run and make it playable.




Step 3:


if defined temp (set "tempFileBase=%temp%\") else if defined tmp set "tempFileBase=%tmp%\"
set "tempFileBase=%tempFileBase%Snake%time::=_%"
set "keyFile=%tempFileBase%_key.txt"
set "cmdFile=%tempFileBase%_cmd.txt"
set "gameLock=%tempFileBase%_gameLock.txt"
set "gameLog=%tempFileBase%_gameLog.txt"
set "signal=%tempFileBase%_signal.txt"
set "saveLoc=%userprofile%\Snake"
set "userPref=%saveLoc%\SnakeUserPref.txt"
set "hiFile=%saveLoc%\Snake!growth!Hi"
set "keyStream=9"
set "cmdStream=8"
set "lockStream=7"

•  This codes will be used for setting up or saving data automatically in different files for different works.

•  The codes will save those data in your system you can change it but this will not may work if someone else use the game from you.




Step 4:


call :launch %lockStream%>"%gameLock%" || goto :getSession
del "%tempFileBase%*"
exit /b

•  This codes will be used to Lock this game session and launch.

•  This code will Loop back and try a new session if failure.

•  This code will Cleanup and exit when finished.




Step 5:


all :fixLogs
copy nul "%keyFile%" >nul
copy nul "%cmdFile%" >nul
start "" /b cmd /c ^""%~f0" startController %keyStream%^>^>"%keyFile%" %cmdStream%^<"%cmdFile%" 2^>nul ^>nul^"
cmd /c ^""%~f0" startGame %keyStream%^<"%keyFile%" %cmdStream%^>^>"%cmdFile%" ^
echo(

•  This codes will be used to launch the game and the controller.

•  This code will load data from game files and restore all things what it was before you closed it last time.




Step 6:


:close
2>nul (>>"%keyFile%" call )||goto :close
if not exist "%~dp0CursorPos.exe" (
echo Game play can be improved by installing
echo Aacini's CursorPos.exe, available at
echo http://goo.gl/hr6Kkn
echo(
echo %cmdcmdline%|find /i "%~f0">nul&&pause
)
exit /b 0

•  This will be used to upon exit, wait for the controller to close before returning.




Step 7:


:game
title %~nx0
cls

•  This codes will be used to set the tile of the game by its name.




Step 8:


set "width=40" max=99
set "height=25" max=99

•  It will config the Play field size.

•  The max playing field: (width-2)*(height-2) <= 1365




Step 9:


set /a cols=width+1, lines=height+10, area=(width-2)*(height-2)
if %area% gtr 1365 (
echo ERROR: Playfield area too large
%sendCmd% quit
exit
)
if %lines% lss 14 set lines=14
if %cols% lss 46 set cols=46
mode con: cols=%cols% lines=%lines%

•  This code will be used to resize the console window, I mean the program height+width, etc.




Step 10:


set "configOptions=diffCode difficulty growth moveKeys up down left right"
set "configOptionCnt=9"

set "moveKeys=4"

set "up=W"
set "down=S"
set "left=A"
set "right=D"
set "pause=P"

set "space= "
set "bound=#"
set "food=+"
set "head=@"
set "body=O"
set "death=X"

set "growth=1"

if exist "%userPref%" for /f "usebackq delims=" %%V in ("%userPref%") do set "%%V"

set "spinner1=-"
set "spinner2=\"
set "spinner3=|"
set "spinner4=/"
set "spinner= spinner1 spinner2 spinner3 spinner4 "

set "delay1=20"
set "delay2=15"
set "delay3=10"
set "delay4=7"
set "delay5=5"
set "delay6=3"

set "desc1=Sluggard"
set "desc2=Crawl"
set "desc3=Slow"
set "desc4=Normal"
set "desc5=Fast"
set "desc6=Insane"

set "spinnerDelay=3"

set /a "width-=1, height-=1"

•  It is the codes to define variables.

•  This is a important part of the game.

•  It is the settings menu for move keys, settings, level choosing and starting a game.




Step 11:


set ^"LF=^

^" Above empty line is required - do not remove

•  This is the codes to define LF as a Line Feed (newline) character

Step 11.1:


for /f %%A in ('copy /Z "%~dpf0" nul') do set "CR=%%A"

•  This is the codes to define CR as a Carriage Return character

Step 11.2:


for /f %%A in ('"prompt $H&for %%B in (1) do rem"') do set "BS=%%A"

set "upper=A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
set "invalid=*~="

•  This is the codes to define BS as a BackSpace character




Step 12:


if exist "%~dp0CursorPos.exe" (
set "cls=CursorPos 0 0"
set "ClearLine=echo( &CursorPos 0 -1"
set "ClearPrev=CursorPos 0 -0&echo( "
) else (
set "cls=cls"
set "ClearLine="
set "ClearPrev="
)

•  This will define macros. This will run the game

Step 12.1:


set ^"\n=^^^%LF%%LF%^%LF%%LF%^^"

•  This will define a newline with line continuation

Step 12.2:


set "setErr=(call)"

•  This will run setErr

•  This code sets the ERRORLEVEL to 1

Step 12.3:


set "clrErr=(call )"

•  This will run clrErr

•  This code sets the ERRORLEVEL to 0

Step 12.4:


set "sendCmd=>&%cmdStream% echo"

•  This will send Cmd command

•  It sends a command to the controller




Step 13:


set getKey=%\n%
for %%# in (1 2) do if %%#==2 (%\n%
set key=%\n%
set inKey=%\n%
set keyTest=%\n%
^<^&%keyStream% set /p "inKey="%\n%
if defined inKey (%\n%
set inKey=!inKey:~0,-1!%\n%
for %%C in (!args!) do set /a keyTest=1^&if /i !inKey! equ %%~C set key=!inKey!%\n%
)%\n%
if not defined keyTest set key=!inKey!%\n%
) else set args=

•  To getKey [ValidKey] [ValidKey...]

•  This will check for key press from the controller. Only accept a Valid Key.

•  Token delimiters and poison characters must be quoted.

•  Accept any key if no ValidKey specified.

•  Return result in Key variable. Key is undefined if no valid key press.




Step 14:


set draw=%\n%
set screen=%\n%
for /l %%Y in (0,1,%height%) do set screen=!screen!!line%%Y!!LF!%\n%
set screen=!screen!Speed = !Difficulty! !replay!!LF!Growth Rate = !growth! HighScore = !hi!!LF!Score = !score! Time = !m!:!s!%\n%
if defined replay if not defined replayFinished (%\n%
set screen=!screen!!LF!!LF!Press a key to abort the replay%\n%
)%\n%
%cls%^&echo(!screen!

•  This codes draws the board




Step 15:


set test=%\n%
for %%# in (1 2) do if %%#==2 (for /f "tokens=1-3" %%1 in ("!args!") do (%\n%
for %%A in ("!line%%2:~%%1,1!") do if "!%%3:%%~A=!" neq "!%%3!" %clrErr% else %setErr%%\n%
)) else set args=

•  To test X Y Value List Var

•  It tests if value at coordinates X,Y is within contents of ValueListVar




Step 16:


set plot=%\n%
for %%# in (1 2) do if %%#==2 (for /f "tokens=1-3" %%1 in ("!args!") do (%\n%
set "part2=!line%%2:~%%1!"%\n%
set "line%%2=!line%%2:~0,%%1!!%%3!!part2:~1!"%\n%
)) else set args=

•  To set plot X Y ValueVar

•  It places contents of ValueVar at coordinates X,Y




Step 17:


setlocal enableDelayedExpansion
if not exist "%saveLoc%\" md "%saveLoc%"
set "replay= Aborting... "
set "replayAvailable="
call :loadHighScores
call :mainMenu

•  This will be used start the game




Step 18:


for /l %%. in () do (

%=== check for and process abort signal if in replay mode ===%
if defined replay if exist "%signal%" (
del "%signal%"
set "replayFinished=1"
%draw%
echo(
%ClearLine%
nul <&%keyStream% for %%A in (!configOptions!) do set "%%A=!%%ASave!" call :mainMenu ) %=== compute time since last move ===% for /f "tokens=1-4 delims=:.," %%a in ("!time: =0!") do set /a "t2=(((1%%a*60)+1%%b)*60+1%%c)*100+1%%d-36610100, tDiff=t2-t1" if !tDiff! lss 0 set /a tDiff+=24*60*60*100 if !tDiff! geq !delay! ( %=== delay has expired, so time for movement ===% set /a t1=t2 %=== compute game time ===% if not defined gameStart set "gameStart=!t2!" set /a "gameTime=(t2-gameStart)" if !gameTime! lss 0 set /a "gameTime+=24*60*60*100" set /a "gameTime=(gameTime-pauseTime)/100, m=gameTime/60, s=gameTime%%60" if !m! lss 10 set "m=0!m!" if !s! lss 10 set "s=0!s!" %=== get keypress ===% %getKey% !keys! if /i !key! equ !pause! ( %=== pause game ===% echo( call :ask "PAUSED - Press a key to continue..." %ClearPrev% %sendCmd% go for /f "tokens=1-4 delims=:.," %%a in ("!time: =0!") do set /a "t2=(((1%%a*60)+1%%b)*60+1%%c)*100+1%%d-36610100, tDiff=t2-t1" if !tDiff! lss 0 set /a tDiff+=24*60*60*100 set /a pauseTime+=tDiff ) else ( %=== establish direction ===% if not defined replay (echo(!key!.) >>"!gameLog!"
for %%K in (!key!) do if !moveKeys! equ 2 (
set /a "xDiff=xTurn%%K*!yDiff!, yDiff=yTurn%%K*!xDiff!"
) else if "!%%KAxis!" neq "!axis!" (
set /a "xDiff=xDiff%%K, yDiff=yDiff%%K"
set "axis=!%%KAxis!"
)

%=== erase the tail ===%
set "TX=!snakeX:~-2!"
set "TY=!snakeY:~-2!"
set "snakeX=!snakeX:~0,-2!"
set "snakeY=!snakeY:~0,-2!"
%plot% !TX! !TY! space

%=== compute new head location and attempt to move ===%
set /a "X=PX+xDiff, Y=PY+yDiff"
set "X= !X!"
set "Y= !Y!"
set "X=!X:~-2!"
set "Y=!Y:~-2!"
(%test% !X! !Y! playerSpace) && (

%=== move successful ===%

%=== remove the new head location from the empty list ===%
for %%X in ("!X!") do for %%Y in ("!Y!") do set "empty=!empty:#%%~X %%~Y=!"

%=== eat any food that may be present ===%
(%test% !X! !Y! food) && (
%=== initiate growth ===%
set /a grow+=growth

%=== locate and draw new food ===%
if defined replay (
<&%keyStream% set /p "F=" ) else ( set /a "F=(!random!%%(emptyCnt-1))*6+1" (echo !F!) >>"!gameLog!"
)
for %%F in (!F!) do (%plot% !empty:~%%F,5! food)
)

if !grow! gtr 0 (
%=== restore the tail ===%
%plot% !TX! !TY! body
set "snakeX=!snakeX!!TX!"
set "snakeY=!snakeY!!TY!"
set /a emptyCnt-=1

%=== manage score ===%
set /a "score+=1, grow-=1"
if not defined replay if !score! gtr !hi! set /a "hi+=1, newHi=1"

) else (
%=== add the former tail position to the empty list ===%
set "empty=!empty!#!TX! !TY!"
)

%=== draw the new head ===%
if defined snakeX (%plot% !PX! !PY! body)
%plot% !X! !Y! head

%=== Add the new head position to the snake strings ===%
set "snakeX=!X!!snakeX!"
set "snakeY=!Y!!snakeY!"
set "PX=!X!"
set "PY=!Y!"

%draw%

) || (

%=== failed move - game over ===%
set "replayFinished=1"
%plot% !TX! !TY! body
call :spinner !PX! !PY! death
%draw%
if defined newHi (
echo(
echo New High Score - Congratulations^^!
set "hi!diffCode!=!score!"
copy "!gameLog!" "%hiFile%!diffCode!.txt" >nul
>>"%hiFile%!diffCode!.txt" echo ::!score!
)
echo(
%ClearLine%
call :ask "Press a key to continue..."
for %%A in (!configOptions!) do set "%%A=!%%ASave!"
call :mainMenu
)
)
)
)

•  main loop (infinite loop)

• This is the main part of the game to play or setting up.




Step 19:


:getString Prompt Var MaxLen
set /a "maxLen=%3"
set "%2="
%sendCmd% prompt

•  Prompt for a string with max lengh of MaxLen.

•  Valid keys are alpha-numeric, space, underscore, and dash.

•  String is terminated by Enter.

•  Backspace works to delete previous character.

•  Result is returned in Var.




Step 20:


:ask Prompt ValidKey [Validkey]...

%sendCmd% prompt

•  Prompt for a keypress.

•  Wait until a ValidKey is pressed and return result in Key variable.

•  Token delimiters, ), and poison characters must be quoted.




Step 21:


:spinnerDelay
for /f "tokens=1-4 delims=:.," %%a in ("!time: =0!") do set /a "d2=(((1%%a*60)+1%%b)*60+1%%c)*100+1%%d-36610100, dDiff=d2-d1"
if %dDiff% lss 0 set /a dDiff+=24*60*60*100
if %dDiff% lss %spinnerDelay% goto :spinnerDelay
set /a d1=d2
exit /b

:mainMenu
cls
set "loadAvailable="
echo Growth rate = !growth!
echo(
echo Main Menu:
echo(
echo N - New game
if defined replayAvailable echo R - Replay previous game
if defined saveAvailable echo S - Save a game
if exist *.snake.txt echo L - Load and watch a saved game&set "loadAvailable=L"

echo C - Control options
echo G - Graphic options
echo Q - Quit
echo(
set "hiAvailable="
for /l %%N in (1 1 6) do if defined hi%%N (
if not defined hiAvailable (
echo Replay High Score:
echo(
)
set "desc=!desc%%N!........"
set "hiAvailable=!hiAvailable! %%N"
echo %%N - !desc:~0,8! !hi%%N!
)
if defined hiAvailable echo(
set "keys=N C G Q !hiAvailable! !replayAvailable! !saveAvailable! !loadAvailable!"
call :ask ">" !keys!
if /i !key! equ Q (
%sendCmd% quit
cls
exit
)
if /i !key! equ N (
set "replay="
set "replayAvailable=R"
set "saveAvailable=S"
goto :initialize
)
if /i !key! equ S (
if defined replayAvailable (
call :ask "HighScore # or P for Previous:" !hiAvailable! P
) else (
call :ask "HighScore #:" !hiAvailable!
)
echo !key!
if /i !key! equ P (set "src=!gameLog!") else set "src=%hiFile%!key!.txt"
call :getString "Save file name:" file 20
copy "!src!" "!file!.snake.txt"
call :ask "Press a key to continue..."
)
if /i !key! equ L (
call :getString "Load file name:" file 20
if exist "!file!.snake.txt" (
set "replay=!file!.snake.txt"
goto :initialize
)
echo Error: File "!file!.snake.txt" not found
call :ask "Press a key to continue..."
)
if /i !key! equ R (
set "replay=!gameLog!"
goto :initialize
)
if !key! geq 1 if !key! leq 6 (
set "replay=%hiFile%!key!.txt"
goto :initialize
)
if /i !key! equ C call :controlOptions
if /i !key! equ G call :graphicOptions
goto :mainMenu

:controlOptions
cls
set "keys={Enter} T L R P"
if !moveKeys! equ 4 set "keys=!keys! U D"
echo Control Options:
echo(
echo T - Type... = !moveKeys! keys
echo(
echo L - Left... = !left!
echo R - Right.. = !right!
if !moveKeys! equ 4 echo U - Up..... = !up!
if !moveKeys! equ 4 echo D - Down... = !down!
echo(
echo P - Pause.. = !pause!
echo(
echo {Enter} - Return to Main Menu
echo(
call :ask ">" !keys!
if !key! equ {Enter} goto :saveUserPrefs
if /i !key! equ T (
if !moveKeys! equ 2 (set "moveKeys=4") else set "moveKeys=2"
goto :controlOptions
)
set "option= LLeft RRight UUp DDown PPause"
for /f %%O in ("!option:* %key%=!") do (
call :ask "Press a key for %%O:"
for %%K in (0 1 2) do if "!key!" equ "!invalid:~%%K,1!" goto :controlOptions
for %%C in (!upper!) do set "key=!key:%%C=%%C!"
set "%%O=!key!"
)
goto :controlOptions

:graphicOptions
cls
echo Graphic Options:
echo(
echo B - Border...... = !bound!
echo E - Empty space. = !space!
echo H - snake Head.. = !head!
echo S - Snake body.. = !body!
echo F - Food........ = !food!
echo D - Death....... = !death!
echo(
echo G - Growth rate. = !growth!
echo(
echo {Enter} - Rturn to Main Menu
echo(
call :ask ">" B E H S F D G {Enter}
if !key! equ {Enter} goto :saveUserPrefs
if /i !key! equ G (
call :ask "Press a digit for growth rate (0 = 10)" 0 1 2 3 4 5 6 7 8 9
if !key! equ 0 set "key=10"
set "growth=!key!"
call :loadHighScores
) else (
set "option=-BBorder:bound:-EEmpty Space:space:-HSnake Head:head:-SSnake Body:body:-FFood:food:-DDeath:death:"
for /f "tokens=1,2 delims=:" %%A in ("!option:*-%key%=!") do (
call :ask "Press a key for %%A"
for %%K in (0 1 2) do if "!key!" equ "!invalid:~%%K,1!" goto :graphicOptions
set "%%B=!key!"
)
)
goto :graphicOptions

:saveUserPrefs
(for %%V in (moveKeys up down left right space bound food head body death pause growth) do echo %%V=!%%V!) >"%userPref%"
exit /b

:initialize
cls
if defined replay (
echo Replay Speed Options:
) else (
echo Speed Options:
)
echo delay
echo # Description (seconds)
echo --- ----------- ---------
for /l %%N in (1 1 6) do (
set "delay=0!delay%%N!"
set "desc=!desc%%N! "
echo %%N !desc:~0,11! 0.!delay:~-2!
)
echo(
call :ask "Pick a speed (1-6):" 1 2 3 4 5 6
set "difficulty=!desc%key%!"
set "delay=!delay%key%!"
set "diffCode=%key%"
echo %key% - %difficulty%
echo(
nul') do set "hi=%%A"
(%draw%)
call :delay 100
) else (
if defined hi%diffCode% (set "hi=!hi%diffCode%!") else set "hi=0"
(%draw%)
>"!gameLog!" (
for %%A in (!configOptions!) do (echo %%A=!%%A!)
(echo END)
)
echo(
if !moveKeys! equ 4 (
echo Controls: !up!=up !down!=down !left!=left !right!=right !pause!=pause
) else (
echo Controls: !left!=left !right!=right !pause!=pause
)
echo Avoid running into yourself (!body!!body!!head!^) or wall (!bound!^)
echo Eat food (!food!^) to grow.
echo(
call :ask "Press a key to start..."
%sendCmd% go
)
set "pauseTime=0"
set "xDiff!up!=+0"
set "xDiff!down!=+0"
set "xDiff!left!=-1"
set "xDiff!right!=+1"
set "yDiff!up!=-1"
set "yDiff!down!=+1"
set "yDiff!left!=+0"
set "yDiff!right!=+0"
set "!up!Axis=Y"
set "!down!Axis=Y"
set "!left!Axis=X"
set "!right!Axis=X"
set "xTurn!left!=1"
set "xTurn!right!=-1"
set "yTurn!left!=-1"
set "yTurn!right!=1"
set "playerSpace=!space!!food!"
set ^"keys="!left!" "!right!" "!pause!"^"
set "newHi="
set "grow=0"
if !moveKeys! equ 4 set ^"keys=!keys! "!up!" "!down!"^"
if exist "%~dp0CursorPos.exe" if not defined replay (
cursorpos 0 -4
for /l %%N in (1 1 5) do (echo( )
)
exit /b

:waitForSignal
if not exist "%signal%" goto :waitForSignal
del "%signal%"
exit /b

:loadHighScores
set "saveAvailable="
for /l %%N in (1 1 6) do (
set "hi%%N="
for /f "delims=:" %%A in ('findstr "^::" "%hiFile%%%N.txt" 2^>nul') do (
set "hi%%N=%%A"
set "saveAvailable=S"
)
)
exit /b

:fixLogs
setlocal enableDelayedExpansion
for %%F in (*.snake) do (
ren "%%F" "%%F.txt"
call :fixLog "%%F.txt"
)
pushd "%SaveLoc%"
for /f "delims=" %%F in ('dir /b SnakeHi*.txt 2^>nul') do (
set "file=%%~nF"
set "file=Snake1Hi!file:~-1!.txt"
ren "%%F" "!file!"
call :fixLog "!file!"
)
popd
exit /b

:fixLog filePath
>"%~1.new" (
<"%~1" ( for %%A in (diffCode difficulty moveKeys up down left right) do ( set /p "val=" (echo %%A=!val!) ) ) (echo growth=1) (echo END) more +7 "%~1" ) move /y "%~1.new" "%~1" >nul
exit /b

•  This codes are for the main menu, controller options, settings, game menu, level select, etc.

• The main functions of the game are in here.




Step 22:


:controller
setlocal enableDelayedExpansion
for /f %%a in ('copy /Z "%~dpf0" nul') do set "CR=%%a"
set "cmd=hold"
set "inCmd="
set "key="
for /l %%. in () do (
if "!cmd!" neq "hold" (
for /f "delims=" %%A in ('xcopy /w "%~f0" "%~f0" 2^>nul') do (
if not defined key set "key=%%A"
)
set "key=!key:~-1!"
if !key! equ !CR! set "key={Enter}"
)
<&%cmdStream% set /p "inCmd="
if defined inCmd (
if !inCmd! equ quit exit
set "cmd=!inCmd!"
if !inCmd! equ replay (
<&%cmdStream% set /p "file=" type "!file!" >&%keyStream%
copy nul "%signal%"
)
set "inCmd="
)
if defined key (
if "!cmd!" equ "prompt" (echo {purged}.)
if "!cmd!" equ "replay" (
copy nul "%signal%" >nul
set "cmd=go"
) else (echo(!key!.)
if "!cmd!" neq "go" set "cmd=hold"
set "key="
)>&%keyStream%
)

•  Detects keypresses and sends the information to the game via a key file.

•  The controller has various modes of input that are activated by commands sent from the game via a cmd file.

•  Modes:

  • hold - No input, wait for command

  • go - Continuously get/send key presses

  • prompt - Send {purged} marker to allow game to purge input buffer, then get/send a single key press and hold

  • one - Get/send a single key press and hold

  • replay - Copy a game log to the key file. The next line in cmd file specifies name of log file to copy. During replay, the controller will send an abort signal to the game if a key is pressed.

  • quit - Immediately exit the controller process

•  As written, this routine incorrectly reports ! as ), but that doesn't matter since we don't need that key. Both and Enter key are reported as {Enter}.

•  An extra character is appended to the output to preserve any control chars when read by SET /P.




Step 23:


•  Now after completing the codes Go to file menu in notepad and click on the "save as" option.

Untitled 2.jpg

• Then Shoose where to save and choose a great name for the game, I will choose 'Hungry Snake' as its name. After the name you must write ".bat", this will make a batch file. Now click "Save".

Untitled 3.jpg

• All done! Now go the the directory and run "[the game name].bat, Example: Hungry Snake.bat.

Untitled 4.jpg

• Start a new game by pressing 'n' then shoose difficulty and play!

Untitled 5.jpg

Watch Our Video If You Still Can't Understand:


[youtube https://www.youtube.com/watch?v=XkZW_GBy7No&w=560&h=315]



Thats all. I think that many people directly downloaded the codes or downloaded the game for easiness. But I hope you haven't done this. You must follow us to get more new updates. And don't  forget to like, share, comment. Thanks