TAILIEUCHUNG - Microsoft WSH and VBScript Programming for the Absolute Beginner Part 25

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 25. If you are new to programming with Microsoft WSH and VBScript and are looking for a solid introduction, this is the book for you. Developed by computer science professors, books in the for the absolute beginner series teach the principles of programming through simple game creation. You will acquire the skills that you need for more practical WSH and VBScript programming applications and will learn how these skills can be put to use in real-world scenarios. Best of all, by the time you finish this book,. | Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition function DoYouWantToPlay strCardlmage Space 15 Rules and _ Instructions vbCrLf _ Space 32 Space 15 _ vbCrLf _ Space 31 Space 15 1. Try to get to 21 without going over. vbCrLf _ Space 31 Space 15 2. Aces count as _ 11s not 1s . vbCrLf _ Space 31 Space 15 3. The dealer _ must stop at 17 or later. vbCrLf _ Space 15 Space 16 vbCrLf _ Space 17 Space 18 vbCrLf _ Space 14 Space 15 vbCrLf _ Space 11 Space 12 vbCrLf _ Space 9 Space 10 vbCrLf _ Space 9 Space 10 vbCrLf _ Space 11 Space 12 vbCrLf _ Space 13 Space 14 vbCrLf _ Space 15 Space 16 vbCrLf _ Space 17 Space 19 vbCrLf _ Space 32 vbCrLf _ Space 32 vbCrLf _ Space 32 vbCrLf _ Space 33 vbCrLf _ __ _ vbCrLf vbCrLf vbCrLf vbCrLf _ Would you like to play a game of Blackjack Lite DoYouWantToPlay MsgBox strCardImage 36 BlackJack Lite End Function If the player clicks on the Yes button the value of DoYouWantToPlay is set to 6. This value will later be tested in the script s main processing section to determine whether the game should continue. Chapter 7 Using Procedures to Organize Scripts Creating the NowGoPlay Function The NowGoPlay function is called when the player clicks on the Yes button on the script s initial pop-up dialog indicating that he or she wants to play the game. function NowGoPlay DealFirstHand PlayTheGame If strUserBusted False Then ComputerPlay End If DetermineWinner End Function This function controls the actual play of the game. It is made up of calls to several other functions. First it calls the DealFirstHand function which deals both the user and the computer their initial cards. Next it calls the PlayTheGame function which allows the user to continue to take hits or hold and determines whether the player busted. The NowGoPlay function then checks the value of the strUserBusted variable to see whether the game should continue. If the user decides to hold then the ComputerPlay function is called so the computer s or dealer s .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.