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

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 41. 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,. | 380 Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition Function MarkPlayerSelection Mark an X or O in the appropriate cell If strPlayerInput Al Then Al strPlayer End If If strPlayerInput A2 Then A2 strPlayer End If If strPlayerInput A3 Then A3 strPlayer End If If strPlayerInput Bl Then Bl strPlayer End If If strPlayerInput B2 Then B2 strPlayer End If If strPlayerInput B3 Then B3 strPlayer End If If strPlayerInput Cl Then Cl strPlayer End If If strPlayerInput C2 Then C2 strPlayer End If If strPlayerInput C3 Then C3 strPlayer End If End Function Building the SeeIfWon Function The SeeIfWon function shown here performs a series of eight tests to see whether the game has been won by one of the players. These tests include checking all three cells in each row and in each column to see whether the same player has selected them. The function also checks diagonally to see whether there is a winner. Chapter 11 Working with Built-In VBScript Objects Function SeeIfWon Check across the first row If A1 strPlayer Then If A2 strPlayer Then If A3 strPlayer Then strWinner strPlayer strDirection - First row across End If End If End If Check across the second row If B1 strPlayer Then If B2 strPlayer Then If B3 strPlayer Then strWinner strPlayer strDirection - Second row across End If End If End If Check across the third row If C1 strPlayer Then If C2 strPlayer Then If C3 strPlayer Then strWinner strPlayer strDirection - Third row across End If End If End If Check the first column If A1 strPlayer Then If B1 strPlayer Then If C1 strPlayer Then strWinner strPlayer strDirection - First column down Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition End If End If End If Check the second column If A2 strPlayer Then If B2 strPlayer Then If C2 strPlayer Then strWinner strPlayer strDirection - Second column down End If End If End If Check the third column If A3 strPlayer Then If B3 strPlayer Then If C3 strPlayer Then strWinner strPlayer

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.